fix(api): better logging for verify oauth code

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-12-29 09:28:45 +01:00
parent 964daef4c1
commit e5b5a8af62

View File

@@ -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.');