feat: Enrich error responses

This commit is contained in:
Faruk AYDIN
2022-11-07 22:51:30 +01:00
parent ad46b3eea3
commit 06a2014bc1
13 changed files with 97 additions and 101 deletions

View File

@@ -23,10 +23,7 @@ const graphQLInstance = graphqlHTTP({
customFormatErrorFn: (error) => {
logger.error(error.path + ' : ' + error.message + '\n' + error.stack);
return {
message: error.message,
locations: error.locations,
};
return error.originalError;
},
});