Skip to content

[BUG] Request object used in the route is not the same object used for exception handling #1955

Discussion options

You must be logged in to vote

Yes, this is by design. Request class is just an API interface to ASGI scope. If you want to share data, use request.state object.
For example, request.state.request_id = 42.

There is a bunch of issues related to this topic. You can search for them for more information.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sevakharutyunyan
Comment options

Answer selected by sevakharutyunyan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants