You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make it possible to define the response RequestBodyLimit gives when limits are exceed.
Motivation
User facing endpoints that accept large bodies should return a response that users can understand, possibly with some tips to solve request issues. The most basic tip being "what is the limit?".
Proposal
I think it could be done either via:
accepting a Fn() -> Response<B> in, or
returning a BoxError
Alternatives
The only alternative I can think of for now is to have another layer that checks if the response status is 413, and change the response body there.
The text was updated successfully, but these errors were encountered:
Given the low maintainence this project currently gets, I would recommend checking the status code for now, if you haven't already implemented that. I agree a better solution should be added though.
Feature Request
Make it possible to define the response
RequestBodyLimit
gives when limits are exceed.Motivation
User facing endpoints that accept large bodies should return a response that users can understand, possibly with some tips to solve request issues. The most basic tip being "what is the limit?".
Proposal
I think it could be done either via:
Fn() -> Response<B>
in, orBoxError
Alternatives
The only alternative I can think of for now is to have another layer that checks if the response status is 413, and change the response body there.
The text was updated successfully, but these errors were encountered: