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

Non-graceful error when proxy is offline #722

Open
manniL opened this issue Mar 27, 2024 · 0 comments
Open

Non-graceful error when proxy is offline #722

manniL opened this issue Mar 27, 2024 · 0 comments

Comments

@manniL
Copy link
Member

manniL commented Mar 27, 2024

Environment

  • Operating System: Darwin
  • Node Version: v21.6.2
  • Nuxt Version: -
  • CLI Version: 3.11.1
  • Nitro Version: -
  • Package Manager: pnpm@8.5.0
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

  1. Use the h3 playground example
  2. Create a handler with the following code (StackBlitz won't work as it is about proxy):
eventHandler((event) => {
  let url = "http://some-non-existent.url.domain"
  return proxyRequest(event, url)
})
  1. Visit the route

Describe the bug

H3 responds with a 500 because the fetch request fails, either because the address can't be found or if the server is offline.

A more graceful way of handling would be nice 🤔

Additional context

No response

Logs

No response

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

No branches or pull requests

1 participant