Fix Value PermissionDenied not found in enum
This commit is contained in:
parent
e57c081cce
commit
7849ebf3f9
1 changed files with 8 additions and 1 deletions
|
@ -8,7 +8,14 @@ export enum JWTError {
|
|||
}
|
||||
|
||||
export function isJwtError(error: GraphQLError): boolean {
|
||||
return !!findValueInEnum(error.extensions.exception.code, JWTError);
|
||||
let jwtError: boolean;
|
||||
try {
|
||||
jwtError = !!findValueInEnum(error.extensions.exception.code, JWTError);
|
||||
} catch (e) {
|
||||
jwtError = false;
|
||||
}
|
||||
|
||||
return jwtError;
|
||||
}
|
||||
|
||||
export function isTokenExpired(error: GraphQLError): boolean {
|
||||
|
|
Loading…
Reference in a new issue