conductor-node 8.6.0 → 8.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -8
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -269,19 +269,16 @@ const server = new ApolloServer({
|
|
|
269
269
|
typeDefs,
|
|
270
270
|
resolvers,
|
|
271
271
|
formatError: (formattedError, error) => {
|
|
272
|
-
const
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
Sentry.captureException(originalError, {
|
|
272
|
+
const origError = unwrapResolverError(error);
|
|
273
|
+
if (origError instanceof ConductorError) {
|
|
274
|
+
Sentry.captureException(origError, {
|
|
276
275
|
level:
|
|
277
|
-
|
|
278
|
-
? "warning"
|
|
279
|
-
: "error",
|
|
276
|
+
origError instanceof ConductorIntegrationError ? "warning" : "error",
|
|
280
277
|
});
|
|
281
278
|
// Return a different error message for your end-user to see in your app's UI.
|
|
282
279
|
return {
|
|
283
280
|
...formattedError,
|
|
284
|
-
message:
|
|
281
|
+
message: origError.endUserMessage,
|
|
285
282
|
};
|
|
286
283
|
} else {
|
|
287
284
|
// ...
|
package/dist/package.json
CHANGED
package/package.json
CHANGED