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

No logs on Internal Server Error in node adapter #11200

Closed
1 task done
dkobierski opened this issue Jun 6, 2024 · 0 comments · Fixed by #11202
Closed
1 task done

No logs on Internal Server Error in node adapter #11200

dkobierski opened this issue Jun 6, 2024 · 0 comments · Fixed by #11202
Labels
needs triage Issue needs to be triaged

Comments

@dkobierski
Copy link
Contributor

dkobierski commented Jun 6, 2024

Astro Info

Astro                    v4.9.2
Node                     v20.11.0
System                   macOS (arm64)
Package Manager          npm
Output                   server
Adapter                  @astrojs/node
Integrations             @astrojs/preact
                         @astrojs/mdx

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

#10285 introduced a try catch which swallows some of the errors making it very hard to know what was the root cause of 500. You should always either log or rethrow in a catch block.

What's the expected result?

All errors should be logged.

Link to Minimal Reproducible Example

Any app with node adapter

npm create astro@latest
cd repro
npx astro add node
npm run build
node dist/server/entry.mjs

# in second terminal
curl localhost:4321 -H 'X-Forwarded-Host: example.com, example2.com' 
# no logs in first terminal

Participation

  • I am willing to submit a pull request for this issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant