h3
h3 copied to clipboard
Non-graceful error when proxy is offline
Environment
- Operating System:
Darwin
- Node Version:
v21.6.2
- Nuxt Version:
-
- CLI Version:
3.11.1
- Nitro Version:
-
- Package Manager:
[email protected]
- Builder:
-
- User Config:
-
- Runtime Modules:
-
- Build Modules:
-
Reproduction
- Use the h3 playground example
- 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)
})
- 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