mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-09-21 18:08:51 +03:00
Fixed inconsistent error response from the API
- we have two JSON error response formats one old, one new (v2) - we couldn't use the new one everywhere before without changing the response from older versions - that is totally irrelevant in Ghost 5.0 as there is only one API version - therefore we can and should use the new response format everywhere - eventually we should rename it so it doesn't have v2 in it
This commit is contained in:
parent
ab4ea4850d
commit
c9ab21f821
@ -33,7 +33,7 @@ module.exports = function setupApiApp() {
|
||||
// Error handling for requests to non-existent API versions
|
||||
apiApp.use(errorHandler.resourceNotFound);
|
||||
apiApp.use(versionMissmatchHandler(APIVersionCompatibilityServiceInstance));
|
||||
apiApp.use(errorHandler.handleJSONResponse(sentry));
|
||||
apiApp.use(errorHandler.handleJSONResponseV2(sentry));
|
||||
|
||||
debug('Parent API setup end');
|
||||
return apiApp;
|
||||
|
Loading…
Reference in New Issue
Block a user