From e7540d542db890bcc2c8cbb4b5dace9adf490bb1 Mon Sep 17 00:00:00 2001 From: jamesschuler Date: Mon, 29 May 2023 21:15:11 -0700 Subject: [PATCH] added logError --- api/src/controllers/auth.controller.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/src/controllers/auth.controller.ts b/api/src/controllers/auth.controller.ts index 5563c10..b7530b4 100644 --- a/api/src/controllers/auth.controller.ts +++ b/api/src/controllers/auth.controller.ts @@ -1,3 +1,4 @@ +import { logError } from "@/handlers/commands/createLog.handler.ts"; import { getDiscordProfile } from "@/handlers/commands/getDiscordProfile.handler.ts"; import { LoginRequest, LoginResponse } from "@/types/login.ts"; import { hashValue } from "@/utils/auth.ts"; @@ -18,6 +19,7 @@ async function login(ctx: RouterContext) { handleResponse(ctx, createResponse({ userId: meResponse!.id })); } else { + await logError("Unable to get discord profile", meResponse); await ctx.state.session.deleteSession(); handleErrorResponse(ctx, "Unable to login. Please try again later."); }