Skip to content

Commit 4fbcbf0

Browse files
authored
Broader except in django parsed_body (#4189)
We are seeing internal errors in the Sentry SDK if `self.request.data` fails. Specifically, it recently failed with `rest_framework.exceptions.UnsupportedMediaType: Unsupported media type "" in request.`. This exception should not prevent sentry from reporting the original error. Similar to a previous fix I made #4001
1 parent f8ec572 commit 4fbcbf0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sentry_sdk/integrations/django/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ def parsed_body(self):
584584
# type: () -> Optional[Dict[str, Any]]
585585
try:
586586
return self.request.data
587-
except AttributeError:
587+
except Exception:
588588
return RequestExtractor.parsed_body(self)
589589

590590

0 commit comments

Comments
 (0)