removes breaking optional chaining in graphql error handler

This commit is contained in:
James
2020-10-21 18:02:36 -04:00
parent e097e924f2
commit 646b46528d

View File

@@ -11,7 +11,7 @@ const errorHandler = async (info, debug, afterErrorHook) => Promise.all(info.res
let response = {
message: err.message,
data: err?.originalError?.data,
data: (err && err.originalError && err.originalError.data) || undefined,
};
if (afterErrorHook) {