mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Keep the original error in registerAsyncTheme (#8977)
refs #8945 - pass the original error as part of the errorDetails - improves logging, so we know what really went wrong - for debug purposes - can be removed at some point
This commit is contained in:
parent
71cee504c2
commit
69657a1ac6
1 changed files with 4 additions and 1 deletions
|
@ -19,7 +19,10 @@ function asyncHelperWrapper(hbs, name, fn) {
|
|||
}).catch(function asyncHelperError(err) {
|
||||
var wrappedErr = err instanceof errors.GhostError ? err : new errors.IncorrectUsageError({
|
||||
err: err,
|
||||
context: 'registerAsyncThemeHelper: ' + name
|
||||
context: 'registerAsyncThemeHelper: ' + name,
|
||||
errorDetails: {
|
||||
originalError: err
|
||||
}
|
||||
}),
|
||||
result = config.get('env') === 'development' ? wrappedErr : '';
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue