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:
commit
d5f13e1510
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue