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

Catch URI parse errors during routing #114

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vendethiel
Copy link
Member

Not sure this is the best way to go about this, but...

@vendethiel
Copy link
Member Author

Travis says:

[IO::Socket::Async::SSL] # Cannot write to closed socket

@vendethiel
Copy link
Member Author

Not sure anymore.
image

@@ -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);
Copy link
Member

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.

@jnthn
Copy link
Member

jnthn commented Oct 6, 2020

The failure is this:

No such method 'raku' for invocant of type 'Str'

I wonder where we've ended up with that being called.

@jnthn
Copy link
Member

jnthn commented Oct 6, 2020

The problem being that 2019.03 is pre-rename, so has no .raku method. Of course, we could just bump to a newer version.

@vendethiel
Copy link
Member Author

I wonder where we've ended up with that being called.

No idea :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants