-
Notifications
You must be signed in to change notification settings - Fork 125
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
make IntoResponse implementation more intuitive #472
Labels
Comments
I'd agree to this in general, but I wonder if it isn't a symptom of the "Into" happening at the wrong level. If e.g. we took a Result and produced a HandlerResult, then the Err branch there is clearly a non-success status (default to 500?). Alternatively, IntoReponse for Errors shouldn't produce a 200, unless set explicitly. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As of right now, the
IntoResponse
forResult<T, E>
just calls theIntoResponse
implementation for either type. This is fine in most use cases, but is counter-intuitive whenErr("API Error")
generates a 200 response.Reported by @tanriol on gitter.
The text was updated successfully, but these errors were encountered: