mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Deprecated handleJSONResponse
- this middleware block is used in v4 but not in v5 - we want to remove it and then rename handleJSONResponseV2 so that we have one single consistent error handling block
This commit is contained in:
parent
1ed9d1ef34
commit
a6e204b829
1 changed files with 7 additions and 0 deletions
|
@ -230,6 +230,9 @@ module.exports.pageNotFound = (req, res, next) => {
|
|||
next(new errors.NotFoundError({message: tpl(messages.pageNotFound)}));
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated: not used as of Ghost v5 and should be removed in a major bump
|
||||
*/
|
||||
module.exports.handleJSONResponse = sentry => [
|
||||
// Make sure the error can be served
|
||||
module.exports.prepareError,
|
||||
|
@ -241,6 +244,10 @@ module.exports.handleJSONResponse = sentry => [
|
|||
jsonErrorRenderer
|
||||
];
|
||||
|
||||
/**
|
||||
* @deprecated with above
|
||||
* @TODO: rename this without the v2 in a major bump
|
||||
*/
|
||||
module.exports.handleJSONResponseV2 = sentry => [
|
||||
// Make sure the error can be served
|
||||
module.exports.prepareError,
|
||||
|
|
Loading…
Add table
Reference in a new issue