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:
- 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.
Feature Request
Make it possible to define the response
RequestBodyLimitgives 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, orBoxErrorAlternatives
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.