Add GraphQL error messages
This commit is contained in:
parent
d8b1f37d93
commit
353d430a3a
|
|
@ -4,6 +4,7 @@ import { typeDefs } from '@/graphql/typedefs';
|
|||
import { resolvers } from '@/graphql/resolvers';
|
||||
import cache from './cache';
|
||||
import log from 'loglevel';
|
||||
import * as Sentry from '@sentry/vue';
|
||||
|
||||
import { router } from '@/router';
|
||||
|
||||
|
|
@ -45,9 +46,11 @@ export default function(uri, networkErrorCallback) {
|
|||
}
|
||||
|
||||
if (graphQLErrors) {
|
||||
graphQLErrors.forEach(({ message, locations, path }) =>
|
||||
log.warn(`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`)
|
||||
);
|
||||
graphQLErrors.forEach(({ message, locations, path }) => {
|
||||
const err = `[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`;
|
||||
log.warn(err);
|
||||
Sentry.captureMessage(err);
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue