-
Notifications
You must be signed in to change notification settings - Fork 557
Description
Problem Statement
In ASGI the request body is a stream and once it has been consumed it can not be consumed again.
This leads to some problems because in case of an error we try to extract information from the request body to give more context (this is also happening for transaction data, I guess)
Related issues:
#1631
#1595
#1632 (comment)
Solution Brainstorm
Refactor the RequestExtractor
of all frameworks that can run in ASGI servers. Also improve the DjangoRequestExtractor
so it can handle both WSGI and ASGI requests.
Also make the AnnotatedValue
more easily understandable, because now this is a lot of magic numbers that no one really know what they are doing.
The length and range is not used in those values, so the minimum looks like this: { "rem": [["!config", "x"]] }
And !raw
means that the body was not parsable (so .json() and .parsed_body() did return None) and !config
means the body was over a certain threshold and therefore too big for sending.