2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00

Merge pull request #4384 from meowtec/fix-error-log

fix bug in which `logError` could not resolve an err without `message`
This commit is contained in:
Jason Williams 2014-11-04 23:20:47 -06:00
commit d5f13e1510

View file

@ -107,7 +107,13 @@ errors = {
stack = err ? err.stack : null;
err = _.isString(err) ? err : (_.isObject(err) ? err.message : 'An unknown error occurred.');
if (!_.isString(err)) {
if (_.isObject(err) && _.isString(err.message)) {
err = err.message;
} else {
err = 'An unknown error occurred.';
}
}
// Overwrite error to provide information that this is probably a permission problem
// TODO: https://github.com/TryGhost/Ghost/issues/3687