mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Added error handling for ghost_head (#8982)
refs #8945 - Ensure that errors in ghost_head are logged - Render some content despite the error!
This commit is contained in:
parent
d04e0f3a0c
commit
6c47285bba
1 changed files with 6 additions and 0 deletions
|
@ -17,6 +17,7 @@ var proxy = require('./proxy'),
|
|||
filters = proxy.filters,
|
||||
labs = proxy.labs,
|
||||
api = proxy.api,
|
||||
logging = proxy.logging,
|
||||
settingsCache = proxy.settingsCache,
|
||||
config = proxy.config,
|
||||
blogIconUtils = proxy.blogIcon;
|
||||
|
@ -168,5 +169,10 @@ module.exports = function ghost_head(options) {
|
|||
return filters.doFilter('ghost_head', head);
|
||||
}).then(function (head) {
|
||||
return new SafeString(head.join('\n ').trim());
|
||||
}).catch(function handleError(err) {
|
||||
logging.error(err);
|
||||
|
||||
// Return what we have so far (currently nothing)
|
||||
return new SafeString(head.join('\n ').trim());
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue