more network logging

(cherry picked from commit 92fb322f7b)
This commit is contained in:
antelle 2020-04-18 15:48:47 +02:00
parent dcfa070176
commit 2693dd9366
No known key found for this signature in database
GPG Key ID: 094A2F2D6136A4EE
1 changed files with 2 additions and 1 deletions

View File

@ -201,7 +201,8 @@ class StorageBase {
});
});
});
req.on('error', () => {
req.on('error', e => {
this.logger.error('HTTP error', opts.method, config.url, e);
return config.error && config.error('network error', {});
});
req.on('timeout', () => {