diff --git a/src/utils/graphQLClient.tsx b/src/utils/graphQLClient.tsx index 7811c047..590bc3cb 100644 --- a/src/utils/graphQLClient.tsx +++ b/src/utils/graphQLClient.tsx @@ -75,7 +75,7 @@ export const createClient = (options?: Partial) => // Determine if the current error is an authentication error. didAuthError: (error) => - error.response.status === 401 || + error.response?.status === 401 || error.graphQLErrors.some((e) => e.message.includes("Must login")), // If didAuthError returns true, clear the token. Ideally we should refresh the token here.