Cleanup database + updates to apollo error handler to check all errors + added hash history to jobs list.
This commit is contained in:
@@ -9,10 +9,20 @@ const errorLink = onError(
|
||||
console.log("networkError", networkError);
|
||||
console.log("operation", operation);
|
||||
console.log("forward", forward);
|
||||
if (
|
||||
graphQLErrors[0]?.message.includes("JWTExpired") ||
|
||||
networkError?.message.includes("JWTExpired")
|
||||
) {
|
||||
|
||||
let expired = false;
|
||||
|
||||
if (graphQLErrors) {
|
||||
if (graphQLErrors[0].message.includes("JWTExpired")) {
|
||||
expired = true;
|
||||
}
|
||||
}
|
||||
if (networkError) {
|
||||
if (networkError?.message.includes("JWTExpired")) {
|
||||
expired = true;
|
||||
}
|
||||
}
|
||||
if (expired) {
|
||||
//User access token has expired
|
||||
//props.history.push("/network-error");
|
||||
console.log("We need a new token!");
|
||||
|
||||
Reference in New Issue
Block a user