Replace GhostError with InternalServerError

no issue

@tryghost/errors no longer exports GhostError, as we should only be using subclasses. Replace with InternalServerError as a new default, but should be replaced with a relevant error when one exists.
This commit is contained in:
Sam Lord 2021-12-14 12:17:48 +00:00
parent 76f06fae3c
commit 80a385ef0c

View File

@ -1,4 +1,4 @@
const {NotFoundError, GhostError} = require('@tryghost/errors');
const {NotFoundError, InternalServerError} = require('@tryghost/errors');
const tpl = require('@tryghost/tpl');
const messages = {
@ -29,7 +29,7 @@ class IntegrationsService {
withRelated: ['api_keys', 'webhooks']
});
} catch (err) {
throw new GhostError({
throw new InternalServerError({
err: err
});
}