mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05: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;
|
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
|
// Overwrite error to provide information that this is probably a permission problem
|
||||||
// TODO: https://github.com/TryGhost/Ghost/issues/3687
|
// TODO: https://github.com/TryGhost/Ghost/issues/3687
|
||||||
|
|
Loading…
Add table
Reference in a new issue