fix: Return specific error message when multipart body limit is exceeded#3611
fix: Return specific error message when multipart body limit is exceeded#3611AndreaBozzo wants to merge 1 commit intotokio-rs:mainfrom
Conversation
When a multipart request exceeds the body limit, the response now returns "Request payload is too large" instead of a generic parsing error message. The status code was already correct (413 PAYLOAD_TOO_LARGE). Fixes: tokio-rs#3216
|
Thank you for approving this PR, have a nice day |
|
I would like to investigate what error messages we got before and why, before merging this. If somebody else wants to do that, it could speed up the release of this. |
Hi @jplatte , i just checked in this morning as i had the branch laying, there is absolutely no rush on my part and i appreciate your attenction About the change, i struggled a bit on understanding how complex the error pathing is as its wrapped into multiple layer and i'm admittedly new to this codebase. Before this PR,
The status code (413) was already correct thanks to Is this needed? not strictly, but i'm guessing it can be useful Open to any feedback / suggestion |
Test plan
body_too_largetests in bothaxumandaxum-extrato verify the error messagecargo testpassescargo fmtcargo clippypassesFixes #3216