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
Request guards lack the ability to customize error Responses on Failures other than setting a Status code. Error catchers can further customize error responses afterwards but they lack the context of the original error that occurred, which could be important for the response.
E.g. a request guard fails to validate some input and wants to render a JSON response including an accompanying error message.
It seems the only way to handle this is to defer to the Handler (having it take a Result<> from the guard). It would be much more convenient if a Responder could some how be passed along to Failure cases.
The text was updated successfully, but these errors were encountered:
Yes, this is absolutely a sore point. I've been working on a revamped error management design that will alleviate the issue. When it's ready, I'll post an issue describing it.
Request guards lack the ability to customize error Responses on Failures other than setting a Status code. Error catchers can further customize error responses afterwards but they lack the context of the original error that occurred, which could be important for the response.
E.g. a request guard fails to validate some input and wants to render a JSON response including an accompanying error message.
It seems the only way to handle this is to defer to the Handler (having it take a Result<> from the guard). It would be much more convenient if a Responder could some how be passed along to Failure cases.
The text was updated successfully, but these errors were encountered: