Replies: 1 comment 1 reply
-
|
I suppose the issue is the middleware isn't fully integrated into Axum, as opposed to something like DefaultBodyLimit. So you get a hyper error, which also isn't converted into an appropriate axum error nicely. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I read this old thread but it didn't really address this problem: tokio-rs/axum#853.
Bug Report
Version
Platform
Crates
Description
I have example code here:
https://github.com/banool/rust-examples/blob/e0e103404ffd1678613fdbe2fe02c12f71ae750a/chunked-limit-demo/src/main.rs
Right now when using the request limit layer you get a client error, rather than a clean 413 response. I was hoping
RequestBodyLimitLayerwould handle this on my behalf, is there a any chance the layer could be modified to handle this more gracefully? Like making the limited body return an error that results in a 413 response?Beta Was this translation helpful? Give feedback.
All reactions