Handling Error with appstate #2272
-
How do you typically handle the following requirements in axum?
It currently looks like I would have to use a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Make your own extractor or middleware.
IntoResponse intentionally doesn’t access to state so you have to pass that in some other way.
This also sounds like a middleware to me. Perhaps the handler sets a response extension which is picked up by a middleware and then converted into a response. |
Beta Was this translation helpful? Give feedback.
Make your own extractor or middleware.
IntoResponse intentionally doesn’t access to state so you have to pass that in some other way.
This also sounds like a middleware to me. Perhaps the handler sets a response extension which is picked up by a middleware and then converted into a response.