feat: add [s3.js] prefix to errors

This commit is contained in:
AJ ONeal 2022-01-06 16:26:28 -07:00
parent 0d388cca6f
commit 755b52a802
No known key found for this signature in database
GPG Key ID: C1D1AA22378CC345
1 changed files with 5 additions and 5 deletions

10
s3.js
View File

@ -112,7 +112,7 @@ module.exports = S3 = {
return resp; return resp;
} }
var err = new Error( var err = new Error(
'expected status 200 but got ' + '[s3.js] expected status 200 but got ' +
resp.statusCode + resp.statusCode +
'. See err.response for more info.' '. See err.response for more info.'
); );
@ -179,7 +179,7 @@ module.exports = S3 = {
return resp; return resp;
} }
var err = new Error( var err = new Error(
'expected status 200 but got ' + '[s3.js] expected status 200 but got ' +
resp.statusCode + resp.statusCode +
'. See err.response for more info.' '. See err.response for more info.'
); );
@ -238,7 +238,7 @@ module.exports = S3 = {
return resp; return resp;
} }
var err = new Error( var err = new Error(
'expected status 201 but got ' + '[s3.js] expected status 201 but got ' +
resp.statusCode + resp.statusCode +
'. See err.response for more info.' '. See err.response for more info.'
); );
@ -291,7 +291,7 @@ module.exports = S3 = {
return resp; return resp;
} }
var err = new Error( var err = new Error(
'expected status 204 but got ' + '[s3.js] expected status 204 but got ' +
resp.statusCode + resp.statusCode +
'. See err.response for more info.' '. See err.response for more info.'
); );
@ -320,7 +320,7 @@ module.exports = S3 = {
case 'DELETE': case 'DELETE':
return S3.del(opts, 'sign'); return S3.del(opts, 'sign');
default: default:
throw new Error(`Unknown method '${method}'`); throw new Error(`[s3.js] Unknown method '${method}'`);
} }
} }
}; };