From f70ec9e2c6202dfda78e8c3fa469632170714c29 Mon Sep 17 00:00:00 2001 From: Daniel Sutton Date: Fri, 15 May 2026 10:26:09 +0100 Subject: [PATCH] fix(webapp): log Google auth conflict as warn instead of error --- .server-changes/google-auth-conflict-warn.md | 6 ++++++ apps/webapp/app/models/user.server.ts | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .server-changes/google-auth-conflict-warn.md diff --git a/.server-changes/google-auth-conflict-warn.md b/.server-changes/google-auth-conflict-warn.md new file mode 100644 index 00000000000..4e6b630ab21 --- /dev/null +++ b/.server-changes/google-auth-conflict-warn.md @@ -0,0 +1,6 @@ +--- +area: webapp +type: improvement +--- + +Downgrade the "Google auth conflict" log from `error` to `warn`. This branch handles an expected user-state mismatch (Google ID belongs to one user, email is on another) by returning the existing auth user — there's no exception to chase, so it shouldn't page on the Sentry error channel. diff --git a/apps/webapp/app/models/user.server.ts b/apps/webapp/app/models/user.server.ts index 68550f6e98c..c48221c4b61 100644 --- a/apps/webapp/app/models/user.server.ts +++ b/apps/webapp/app/models/user.server.ts @@ -233,7 +233,7 @@ export async function findOrCreateGoogleUser({ // Check if email user and auth user are the same if (existingEmailUser.id !== existingUser.id) { // Different users: email is taken by one user, Google auth belongs to another - logger.error( + logger.warn( `Google auth conflict: Google ID ${authenticationProfile.id} belongs to user ${existingUser.id} but email ${email} is taken by user ${existingEmailUser.id}`, { email,