mirror of https://github.com/therootcompany/s3.js
feat: add [s3.js] prefix to errors
This commit is contained in:
parent
0d388cca6f
commit
755b52a802
10
s3.js
10
s3.js
|
@ -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}'`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue