alloc / alloc/vite-plugin-rehost

Handle connection errors more elegantly

Aperta
#1 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
TypeScript
Stelle
5
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

The current error message is bad:
```
(node:19992) UnhandledPromiseRejectionWarning: FetchError: request to https://unpkg.com/modern-normalize@1.0.0/modern-normalize.css failed, reason: getaddrinfo ENOTFOUND unpkg.com
at ClientRequest. (~/dev/vite-plugin-rehost/node_modules/.pnpm/node-fetch@2.6.1/node_modules/node-fetch/lib/index.js:1461:11)
at ClientRequest.emit (events.js:314:20)
at TLSSocket.socketErrorListener (_http_client.js:469:9)
at TLSSocket.emit (events.js:314:20)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
(node:19992) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.