-
Notifications
You must be signed in to change notification settings - Fork 26
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
Catch URI parse errors during routing #114
base: main
Are you sure you want to change the base?
Conversation
Travis says:
|
lib/Cro/HTTP/Router.pm6
Outdated
@@ -231,6 +231,12 @@ module Cro::HTTP::Router { | |||
my @*BIND-FAILS; | |||
my $log-timeline-task = $request.annotations<log-timeline>; | |||
my $routing-outcome = Cro::HTTP::LogTimeline::Route.log: $log-timeline-task, -> { | |||
CATCH { | |||
when X::Cro::Uri::ParseError { | |||
emit Cro::HTTP::Response.new(:500status, :$request); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be 400 (Bad Request), since it's the client's fault.
The failure is this:
I wonder where we've ended up with that being called. |
The problem being that 2019.03 is pre-rename, so has no |
No idea :). |
Not sure this is the best way to go about this, but...