Compare commits

...

1 Commits

Author SHA1 Message Date
Rahul Padigela 0e0cab38a0 improvement: use Arsenal error messages 2018-08-30 17:32:17 -07:00
1 changed files with 3 additions and 3 deletions

View File

@ -998,6 +998,7 @@ class UtapiClient {
this._checkMetricTypes(params); this._checkMetricTypes(params);
const action = (updateSize < 0) ? 'decrby' : 'incrby'; const action = (updateSize < 0) ? 'decrby' : 'incrby';
const size = (updateSize < 0) ? -updateSize : updateSize; const size = (updateSize < 0) ? -updateSize : updateSize;
log.info('UTAPI DEBUG!!!', { action, size, updateSize });
return this.ds[action](generateKey(params, 'locationStorage'), size, return this.ds[action](generateKey(params, 'locationStorage'), size,
err => { err => {
if (err) { if (err) {
@ -1005,8 +1006,7 @@ class UtapiClient {
method: 'UtapiClient.pushLocationMetric', method: 'UtapiClient.pushLocationMetric',
error: err, error: err,
}); });
return this._pushLocalCache(params, 'locationStorage', null, return callback(errors.InternalError);
log, callback);
} }
return callback(); return callback();
}); });
@ -1033,7 +1033,7 @@ class UtapiClient {
method: 'UtapiClient: getLocationMetric', method: 'UtapiClient: getLocationMetric',
error: err, error: err,
}); });
return callback(err); return callback(errors.InternalError);
} }
// if err and bytesStored are null, key does not exist yet // if err and bytesStored are null, key does not exist yet
if (bytesStored === null) { if (bytesStored === null) {