-
-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transform errors when extract parameters #814
Labels
enhancement
New feature or request
Comments
Seems like we can use a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of the feature
This code snippet:
would be expanded to:
I know I can change the return type of my function to customize error in my handling logic, but what if I'd like to decorate the error message when fail to
<Json<Query> as poem::FromRequest>::from_request(&req, &mut body).await?
?.Code example (if possible)
By default, it may return:
while I'd prefer to customize the error message, like:
The text was updated successfully, but these errors were encountered: