Compare commits

...

1 Commits

Author SHA1 Message Date
Dora Korpar 60d9a4957a Change err to err message 2017-07-12 13:56:43 -07:00
1 changed files with 10 additions and 10 deletions

View File

@ -40,7 +40,7 @@ class AwsClient {
if (err) {
const log = createLogger(reqUids);
log.error('err from data backend',
{ error: err, dataStoreName: this._dataStoreName });
{ error: err.message, dataStoreName: this._dataStoreName });
return callback(errors.InternalError);
}
return callback(null, awsKey);
@ -60,7 +60,7 @@ class AwsClient {
{ responseHeaders: response.httpResponse.headers });
});
const stream = request.createReadStream().on('error', err => {
log.error('error streaming data from AWS', { error: err,
log.error('error streaming data from AWS', { error: err.message,
dataStoreName: this._dataStoreName });
});
return callback(null, stream);
@ -77,7 +77,7 @@ class AwsClient {
if (err) {
const log = createLogger(reqUids);
log.error('error deleting object from datastore',
{ error: err, implName: this._clientType });
{ error: err.message, implName: this._clientType });
return callback(errors.InternalError);
}
return callback();
@ -95,7 +95,7 @@ class AwsClient {
Bucket: this._awsBucketName },
(err, data) => {
if (err) {
multBackendResp[location] = { error: err };
multBackendResp[location] = { error: err.message };
} else if (!data.Status ||
data.Status === 'Suspended') {
multBackendResp[location] = {
@ -122,7 +122,7 @@ class AwsClient {
return this._client.createMultipartUpload(params, (err, mpuResObj) => {
if (err) {
log.error('err from data backend',
{ error: err, dataStore: this._dataStoreName });
{ error: err.message, dataStore: this._dataStoreName });
return callback(errors.InternalError);
}
return callback(null, mpuResObj);
@ -143,7 +143,7 @@ class AwsClient {
return this._client.uploadPart(params, (err, partResObj) => {
if (err) {
log.error('err from data backend on uploadPart',
{ error: err, dataStoreName: this._dataStoreName });
{ error: err.message, dataStoreName: this._dataStoreName });
return callback(errors.InternalError);
}
// Because we manually add quotes to ETag later, remove quotes here
@ -184,12 +184,12 @@ class AwsClient {
if (err) {
if (mpuError[err.code]) {
log.trace('err from data backend on completeMPU',
{ error: err,
{ error: err.message,
dataStoreName: this._dataStoreName });
return callback(errors[err.code]);
}
log.error('err from data backend on completeMPU',
{ error: err, dataStoreName: this._dataStoreName });
{ error: err.message, dataStoreName: this._dataStoreName });
return callback(errors.InternalError);
}
// need to get content length of new object to store
@ -198,7 +198,7 @@ class AwsClient {
(err, objHeaders) => {
if (err) {
log.trace('err from data backend on headObject',
{ error: err,
{ error: err.message,
dataStoreName: this._dataStoreName });
return callback(errors.InternalError);
}
@ -219,7 +219,7 @@ class AwsClient {
if (err) {
log.error('There was an error aborting the MPU on AWS S3. You' +
' should abort directly on AWS S3 using the same uploadId.',
{ error: err, dataStoreName: this._dataStoreName });
{ error: err.message, dataStoreName: this._dataStoreName });
return callback(errors.InternalError);
}
return callback();