Skip to content

Commit f70ec9e

Browse files
committed
fix(webapp): log Google auth conflict as warn instead of error
1 parent ac02c0f commit f70ec9e

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
area: webapp
3+
type: improvement
4+
---
5+
6+
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.

apps/webapp/app/models/user.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ export async function findOrCreateGoogleUser({
233233
// Check if email user and auth user are the same
234234
if (existingEmailUser.id !== existingUser.id) {
235235
// Different users: email is taken by one user, Google auth belongs to another
236-
logger.error(
236+
logger.warn(
237237
`Google auth conflict: Google ID ${authenticationProfile.id} belongs to user ${existingUser.id} but email ${email} is taken by user ${existingEmailUser.id}`,
238238
{
239239
email,

0 commit comments

Comments
 (0)