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: serve handler error with 0 arguments #23652

Merged
merged 4 commits into from May 17, 2024
Merged

Conversation

marvinhagemeister
Copy link
Contributor

Fixes #23651

Copy link
Member

@mmastrac mmastrac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I'm OK to merge this, but it's unlikely that a user would realistically write a handler with no arguments and this helps avoid cases where a fetch export sets off a false positive for our deno serve hint message. If we're good with that tradeoff, we can merge it. :)

@@ -0,0 +1,5 @@
{
"args": "serve --port 12345 main.ts",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does deno serve find an open port? Maybe we should exclude it from the test? This port conflicts with another test.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to pick to an open port here? deno serve doesn't find an open port.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should fix it #23846

ext/http/00_serve.ts Outdated Show resolved Hide resolved
@satyarohith satyarohith changed the title fix: serve handler error with 0 arguments fix(ext/http): serve handler error with 0 arguments May 17, 2024
@satyarohith satyarohith changed the title fix(ext/http): serve handler error with 0 arguments fix: serve handler error with 0 arguments May 17, 2024
@satyarohith satyarohith merged commit 812f2e4 into main May 17, 2024
17 checks passed
@satyarohith satyarohith deleted the serve-error-handler branch May 17, 2024 12:35
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.

Bug: deno serve errors on fetch callback with no arguments
5 participants