mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 23:57:49 +00:00
Cleanup error messages for jobs that fail to start .
This commit is contained in:
@@ -384,8 +384,12 @@ function onJobStart(error, res, body) {
|
||||
this.restart();
|
||||
return;
|
||||
}
|
||||
var na = 'unavailable',
|
||||
bodyStr = _.isObject(body) ? '\n' + JSON.stringify(body) : na,
|
||||
statusStr = _.isFinite(statusCode) ? statusCode : na;
|
||||
|
||||
logInline();
|
||||
console.error('Failed to start job; status: %d, body:\n%s', statusCode, JSON.stringify(body));
|
||||
console.error('Failed to start job; status: %s, body: %s', statusStr, bodyStr);
|
||||
if (error) {
|
||||
console.error(error);
|
||||
}
|
||||
@@ -470,7 +474,7 @@ function onJobStatus(error, res, body) {
|
||||
}
|
||||
else {
|
||||
if (typeof message == 'undefined') {
|
||||
message = 'no results available. ' + details;
|
||||
message = 'Results are unavailable. ' + details;
|
||||
}
|
||||
console.error(label, description, chalk.red('failed') + ';', message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user