From e5b5a8af621cac1f723efcdd94a292c817e1df6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl-Gerhard=20Lindesva=CC=88rd?= Date: Sun, 29 Dec 2024 09:28:45 +0100 Subject: [PATCH] fix(api): better logging for verify oauth code --- apps/api/src/controllers/oauth-callback.controller.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/api/src/controllers/oauth-callback.controller.tsx b/apps/api/src/controllers/oauth-callback.controller.tsx index cc3c2e13..e852a52a 100644 --- a/apps/api/src/controllers/oauth-callback.controller.tsx +++ b/apps/api/src/controllers/oauth-callback.controller.tsx @@ -88,7 +88,7 @@ export async function githubCallback( tokens = await github.validateAuthorizationCode(code); } catch (error) { req.log.error('github authorization failed', { - error: error instanceof Error ? error.message : 'Unknown error', + error, provider: 'github', }); return reply.status(400).send('Please restart the process.'); @@ -295,7 +295,7 @@ export async function googleCallback( tokens = await google.validateAuthorizationCode(code, codeVerifier); } catch (error) { req.log.error('google authorization failed', { - error: error instanceof Error ? error.message : 'Unknown error', + error, provider: 'google', }); return reply.status(400).send('Please restart the process.');