0
Fork 0
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:
Hannah Wolfe 2017-09-05 20:11:59 +02:00 committed by Katharina Irrgang
parent 71cee504c2
commit 69657a1ac6

View file

@ -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 : '';