-
Notifications
You must be signed in to change notification settings - Fork 457
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
contrib/labstack/echo.v4: add WithErrorTranslator Option #2169
Conversation
Hey @ahmed-mez , if there is anything I can do to expedite this PR, let me know! |
Hey @mattscamp - thanks for the contribution! The PR is triaged and the corresponding team will review in the coming days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! @mattscamp
After reviewing with @zarirhamza, we just came up with a few minor changes to simplify the code a little bit and make the name of the option a little bit more descriptive. Once these few changes are made, it should be good to go.
Thanks @rarguelloF @zarirhamza - made those suggested updates! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Thanks!!
What does this PR do?
Adds a
WithErrorTranslator
Option that allows defining a translator of custom errors to the required format.Motivation
We use a custom error type across our company that cannot be translated to an
echo.HTTPError
which results in all our status codes set as 500.Reviewer's Checklist