From 6f23b384f31e374deff61e5560b116e98b6dd401 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sun, 3 Nov 2024 10:22:02 +0100 Subject: [PATCH] Add guard --- apps/api/src/app/auth/jwt.strategy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/app/auth/jwt.strategy.ts b/apps/api/src/app/auth/jwt.strategy.ts index 1200ed465..7a3fb224b 100644 --- a/apps/api/src/app/auth/jwt.strategy.ts +++ b/apps/api/src/app/auth/jwt.strategy.ts @@ -60,7 +60,7 @@ export class JwtStrategy extends PassportStrategy(Strategy, 'jwt') { ); } } catch (error) { - if (error?.getStatus() === StatusCodes.TOO_MANY_REQUESTS) { + if (error?.getStatus?.() === StatusCodes.TOO_MANY_REQUESTS) { throw error; } else { throw new HttpException(