Skip to content
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

Consider passing request to error handlers (404/500) #166

Open
m4tx opened this issue Feb 17, 2025 · 0 comments
Open

Consider passing request to error handlers (404/500) #166

m4tx opened this issue Feb 17, 2025 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@m4tx
Copy link
Member

m4tx commented Feb 17, 2025

Currently, the error handlers are not very nice to use, because the Request object is not passed to them. This is for good reasons (an owned object is passed to the request handler, both for performance and usability reasons), but this limits what the error handlers can do. Particularly, they cannot reverse URLs.

If this proves to be hard or not performant enough, we should at least consider creating a fake Request object that would contain some "globally-available" stuff, like the root router to allow cot::reverse! usage.

@m4tx m4tx added the enhancement New feature or request label Feb 17, 2025
@m4tx m4tx added this to the v0.2 milestone Feb 17, 2025
@m4tx m4tx added this to Roadmap Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant