diff --git a/apps/production/src/auth/auth.service.ts b/apps/production/src/auth/auth.service.ts index daf465b33..4c440895b 100644 --- a/apps/production/src/auth/auth.service.ts +++ b/apps/production/src/auth/auth.service.ts @@ -604,6 +604,11 @@ export class AuthService { return await this.handleExistingUserGoogle(user, headers, ip) } catch (error) { console.error(`[ERROR][AuthService -> authenticateGoogle]: ${error}`) + + if (error === 'invalid_token') { + throw new BadRequestException('Google token is expired') + } + throw new InternalServerErrorException( 'Something went wrong while authenticating user with Google', )