Compare commits

...

2 Commits

Author SHA1 Message Date
AJ ONeal 961740ffa0
1.8.3 2022-07-07 02:56:00 -06:00
AJ ONeal 3aac42d08b
fix: register otherwise silent http response error 2022-07-07 02:55:16 -06:00
3 changed files with 5 additions and 2 deletions

View File

@ -120,6 +120,9 @@ function handleResponse(resp, opts, cb) {
resp.body = '';
}
resp._bodyLength = 0;
resp.once('error', function (err) {
cb(err, resp, resp.body);
});
resp.on('readable', function () {
var chunk;
while ((chunk = resp.read())) {

2
package-lock.json generated
View File

@ -1,5 +1,5 @@
{
"name": "@root/request",
"version": "1.8.2",
"version": "1.8.3",
"lockfileVersion": 1
}

View File

@ -1,6 +1,6 @@
{
"name": "@root/request",
"version": "1.8.2",
"version": "1.8.3",
"description": "A lightweight, zero-dependency drop-in replacement for request",
"main": "index.js",
"files": [