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
People ask about short-circuiting from handler functions with non-IntoResponse errors somewhat frequently.
We already have ErrorResponse in axum::response for returning different error types from a handler function conveniently. However, right now it is quite annoying to construct one from a non-IntoResponse error type (see alternatives).
Feature Request
Motivation
People ask about short-circuiting from handler functions with non-
IntoResponse
errors somewhat frequently.We already have
ErrorResponse
inaxum::response
for returning different error types from a handler function conveniently. However, right now it is quite annoying to construct one from a non-IntoResponse
error type (see alternatives).Proposal
Add
to allow users to write
Alternatives
Expose a free function, same thing but less verbose
Do nothing. One can already do
Open questions
Should the
internal_server_error
function log the error as well?The text was updated successfully, but these errors were encountered: