-
Notifications
You must be signed in to change notification settings - Fork 121
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
Redirects can no longer be used in error blocks #269
Comments
I have the same issue with my nimnews package. The code is rather simple: proc root*(req: Request): Future[ResponseData] {.async.} =
block route:
redirect("/group/") |
I am having similar issues with Jester
The redirect in the Then if I move to a custom match proc like in exmaple2 I can't use
The I am using: |
* Fixes crash described in #296. * Fix #211 - custom routers now get the same default error handling as normal routers * Add changelog entry * Fix #269 - you can now redirect within error handlers again * Preserve backward compatibility in `initJester` * Restore `initJester` proc for MatchProcSync matchers Co-authored-by: Dominik Picheta <[email protected]>
First, thanks for all your work on Jester! It's a very nice framework.
It seems that it's no longer possible to use a redirect within an error block with
0.5.0
. With Jester0.4.3
, this snippet compiles and works as expected:With
0.5.0
, I get the following compilation error:If I change the
redirect
to aresp
, the sample successfully compiles.I haven't dug into it enough to be certain, but it seems likely that this is due to the changes in #265. Adding
halt = false
to the redirect call makes no difference.The text was updated successfully, but these errors were encountered: