File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,22 @@ def removed_because_over_size_limit(cls, value=""):
7676 },
7777 )
7878
79+ @classmethod
80+ def removed_because_body_consumed_and_not_cached (cls , value = "" ):
81+ # type: (Any) -> AnnotatedValue
82+ """The actual value was removed because the underlying stream has been consumed, without caching the value."""
83+ return AnnotatedValue (
84+ value = value ,
85+ metadata = {
86+ "rem" : [ # Remark
87+ [
88+ "!consumed" , # Because the original stream is unavailable
89+ "x" , # The fields original value was removed
90+ ]
91+ ]
92+ },
93+ )
94+
7995 @classmethod
8096 def substituted_because_contains_sensitive_data (cls ):
8197 # type: () -> AnnotatedValue
Original file line number Diff line number Diff line change @@ -663,7 +663,7 @@ async def extract_request_info(self):
663663 and "sentry_sdk.is_body_cached" in self .request .scope ["state" ]
664664 and self .request .scope ["state" ]["sentry_sdk.is_body_cached" ]
665665 )
666- if self .request .is_disconnected () and not is_body_cached :
666+ if await self .request .is_disconnected () and not is_body_cached :
667667 request_info ["data" ] = (
668668 AnnotatedValue .removed_because_body_consumed_and_not_cached ()
669669 )
You can’t perform that action at this time.
0 commit comments