Cleanup database + updates to apollo error handler to check all errors + added hash history to jobs list.

This commit is contained in:
Patrick Fic
2020-01-22 14:45:10 -08:00
parent 4bac820887
commit 42505ad74e
25 changed files with 1803 additions and 10 deletions

View File

@@ -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!");