esy-issues icon indicating copy to clipboard operation
esy-issues copied to clipboard

Better error when a dependency's url is invalid

Open chenglou opened this issue 8 years ago • 0 comments

Right now it gives:

(node:98869) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: fetch failed with status code 404
Error: fetch failed with status code 404
    at Request.<anonymous> (/usr/local/lib/node_modules/esy/node_modules/npm-registry-client/lib/fetch.js:58:14)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at Request.onRequestResponse (/usr/local/lib/node_modules/esy/node_modules/request/request.js:986:10)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at HTTPParser.parserOnIncomingClient (_http_client.js:472:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
    at TLSSocket.socketOnData (_http_client.js:361:20)
    at emitOne (events.js:96:13)
    at TLSSocket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at TLSSocket.Readable.push (_stream_readable.js:134:10)
    at TLSWrap.onread (net.js:543:20)

chenglou avatar Feb 06 '17 02:02 chenglou