diff --git a/ghost/mw-error-handler/lib/mw-error-handler.js b/ghost/mw-error-handler/lib/mw-error-handler.js index bfd2780219..f1aed0c447 100644 --- a/ghost/mw-error-handler/lib/mw-error-handler.js +++ b/ghost/mw-error-handler/lib/mw-error-handler.js @@ -173,27 +173,27 @@ module.exports.pageNotFound = (req, res, next) => { }; module.exports.handleJSONResponse = sentry => [ - // Make sure the error can be served - module.exports.prepareError, // Handle the error in Sentry sentry.errorHandler, + // Make sure the error can be served + module.exports.prepareError, // Render the error using JSON format jsonErrorRenderer ]; module.exports.handleJSONResponseV2 = sentry => [ - // Make sure the error can be served - module.exports.prepareError, // Handle the error in Sentry sentry.errorHandler, + // Make sure the error can be served + module.exports.prepareError, // Render the error using JSON format jsonErrorRendererV2 ]; module.exports.handleHTMLResponse = sentry => [ - // Make sure the error can be served - module.exports.prepareError, // Handle the error in Sentry - sentry.errorHandler + sentry.errorHandler, + // Make sure the error can be served + module.exports.prepareError ]; diff --git a/ghost/mw-error-handler/package.json b/ghost/mw-error-handler/package.json index b0e849c45a..efd8630c60 100644 --- a/ghost/mw-error-handler/package.json +++ b/ghost/mw-error-handler/package.json @@ -26,6 +26,8 @@ }, "dependencies": { "@tryghost/debug": "^0.1.9", - "@tryghost/tpl": "^0.1.8" + "@tryghost/errors": "1.2.5", + "@tryghost/tpl": "^0.1.8", + "lodash": "4.17.21" } }