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

fix(router): send 204 with empty string in preemptive mode instead of 404 #409

Merged
merged 4 commits into from
Jun 20, 2023

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Jun 20, 2023

Resolves #407. When preemptive router flag is enabled and an event handler is returning nothing, instead of showing a 404, we response empty string with 204 No Content gracefully.

This PR also makes slight fixes:

  • Use path instead of route in error message of default app to distinguish errors
  • Respect preemptive flag for when a route METHOD is not matching.

Note: For nitro, we need to enable flag to make this change effective.

@pi0 pi0 changed the title fix(router): sent 204 with empty string in preemptive mode fix(router): send 204 with empty string in preemptive mode Jun 20, 2023
@pi0 pi0 changed the title fix(router): send 204 with empty string in preemptive mode fix(router): send 204 with empty string in preemptive mode instead of 404 Jun 20, 2023
@pi0 pi0 merged commit 2b2d596 into main Jun 20, 2023
@pi0 pi0 deleted the fix/router-preemptive branch June 20, 2023 21:24
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.

404 Cannot find any route matching
1 participant