From b9f36d04a812786c0aef23c0d5e735608b8abccb Mon Sep 17 00:00:00 2001 From: Balu Babu Date: Thu, 3 Aug 2023 17:14:57 +0530 Subject: [PATCH] chore: modified error code for magic-link provider check --- packages/hoppscotch-backend/src/auth/auth.controller.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/hoppscotch-backend/src/auth/auth.controller.ts b/packages/hoppscotch-backend/src/auth/auth.controller.ts index b09aff9d6..6375cb584 100644 --- a/packages/hoppscotch-backend/src/auth/auth.controller.ts +++ b/packages/hoppscotch-backend/src/auth/auth.controller.ts @@ -30,6 +30,7 @@ import { GithubSSOGuard } from './guards/github-sso.guard'; import { MicrosoftSSOGuard } from './guards/microsoft-sso-.guard'; import { ThrottlerBehindProxyGuard } from 'src/guards/throttler-behind-proxy.guard'; import { SkipThrottle } from '@nestjs/throttler'; +import { AUTH_PROVIDER_NOT_SPECIFIED } from 'src/errors'; @UseGuards(ThrottlerBehindProxyGuard) @Controller({ path: 'auth', version: '1' }) @@ -45,7 +46,7 @@ export class AuthController { @Query('origin') origin: string, ) { if (!authProviderCheck(AuthProvider.EMAIL)) - throw new InternalServerErrorException(); + throwHTTPErr({ message: AUTH_PROVIDER_NOT_SPECIFIED, statusCode: 404 }); const deviceIdToken = await this.authService.signInMagicLink( authData.email,