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
Trouble is, my AppState that I pass into handlers holds a shared reference to both my template engine and the request's cookie jar (so I can identify the user). I'd like to render a pretty error page using these resources - any well documented patterns for this? Basically I want an AppError that can get the same extracts as handler functions, or some other (simple?) pattern.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
I'm using a
Result<Response, AppError>
in order to make error paths quickly display an HTML error, like so:Trouble is, my AppState that I pass into handlers holds a shared reference to both my template engine and the request's cookie jar (so I can identify the user). I'd like to render a pretty error page using these resources - any well documented patterns for this? Basically I want an AppError that can get the same extracts as handler functions, or some other (simple?) pattern.
axum version
0.7.4
Beta Was this translation helpful? Give feedback.
All reactions