Add logging to catch specific error type on double notification insert

This commit is contained in:
Eli Ribble 2025-11-13 17:48:56 +00:00
parent a6fe8f9027
commit bc60be3b48
No known key found for this signature in database

View file

@ -49,7 +49,8 @@ func notifyOauthInvalid(ctx context.Context, user *models.User) {
}
err := user.InsertUserNotifications(ctx, PGInstance.BobDB, &notificationSetter)
if err != nil {
slog.Error("Failed to get oauth user", slog.String("err", err.Error()))
LogErrorTypeInfo(err)
slog.Error("Failed to insert new notification. Update this clause to detect duplicate inserts.", slog.String("err", err.Error()))
return
}
}