reduce error info

This commit is contained in:
Eneko Lakasta 2018-06-06 15:23:53 +02:00
parent 3891d93b8d
commit 340e55ea46
2 changed files with 1 additions and 4 deletions

View File

@ -18,7 +18,7 @@ ApikeyAuth.prototype.verifyCredentials = function (callback) {
this.metadataBackend.getApikey(this.username, this.apikeyToken, (err, apikey) => { this.metadataBackend.getApikey(this.username, this.apikeyToken, (err, apikey) => {
if (err) { if (err) {
err.http_status = 500; err.http_status = 500;
err.message = 'Unexpected error fetching from Redis'; err.message = 'Unexpected error';
return callback(err); return callback(err);
} }

View File

@ -19,9 +19,6 @@ QueryRunner.prototype.run = function (job_id, sql, user, timeout, dbparams, call
} }
const dbConfigurationError = new Error('Batch Job DB misconfiguration'); const dbConfigurationError = new Error('Batch Job DB misconfiguration');
dbConfigurationError.type = 'batch-job';
dbConfigurationError.subtype = 'job-db-conf-error';
dbConfigurationError.http_status = 400;
return callback(dbConfigurationError); return callback(dbConfigurationError);
}; };