Add a missing new keyword when trying to format the graphql errors

This commit is contained in:
Convly 2022-02-22 12:14:50 +01:00
parent 7576b81d1f
commit d50519d2d6

View File

@ -44,7 +44,7 @@ const formatGraphqlError = error => {
// Internal server error
strapi.log.error(originalError);
return ApolloError('Internal Server Error', 'INTERNAL_SERVER_ERROR');
return new ApolloError('Internal Server Error', 'INTERNAL_SERVER_ERROR');
};
module.exports = formatGraphqlError;