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
As of right now, the IntoResponse for Result<T, E> just calls the IntoResponse implementation for either type. This is fine in most use cases, but is counter-intuitive when Err("API Error") generates a 200 response.
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.
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: