mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 19:07: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();
|
this.restart();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
var na = 'unavailable',
|
||||||
|
bodyStr = _.isObject(body) ? '\n' + JSON.stringify(body) : na,
|
||||||
|
statusStr = _.isFinite(statusCode) ? statusCode : na;
|
||||||
|
|
||||||
logInline();
|
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) {
|
if (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
@@ -470,7 +474,7 @@ function onJobStatus(error, res, body) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (typeof message == 'undefined') {
|
if (typeof message == 'undefined') {
|
||||||
message = 'no results available. ' + details;
|
message = 'Results are unavailable. ' + details;
|
||||||
}
|
}
|
||||||
console.error(label, description, chalk.red('failed') + ';', message);
|
console.error(label, description, chalk.red('failed') + ';', message);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user