mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-27 12:53:13 +03:00
06b03bbcfe
no issue - Split out 'getPostPage' & rename to fetchData - Split format response methods into own files - Split out handleError - Split out setReqCtx and rename to setRequestIsSecure - Split out theme paths - Refactor tests in index_spec.js to be more robust - Add tests to bring coverage for split file up to 100%
13 lines
314 B
JavaScript
13 lines
314 B
JavaScript
function handleError(next) {
|
|
return function handleError(err) {
|
|
// If we've thrown an error message of type: 'NotFound' then we found no path match.
|
|
if (err.errorType === 'NotFoundError') {
|
|
return next();
|
|
}
|
|
|
|
return next(err);
|
|
};
|
|
}
|
|
|
|
module.exports = handleError;
|