Add logging for fail-open email uniqueness validations
Log warnings when query errors occur in email uniqueness checks to improve visibility of data integrity issues
This commit is contained in:
parent
5c3657fed1
commit
7e9de8e95b
2 changed files with 14 additions and 2 deletions
|
|
@ -63,7 +63,13 @@ defmodule Mv.Membership.Member.Validations.EmailNotUsedByOtherUser do
|
|||
{:ok, _} ->
|
||||
{:error, field: :email, message: "is already used by another user", value: email}
|
||||
|
||||
{:error, _} ->
|
||||
{:error, reason} ->
|
||||
require Logger
|
||||
|
||||
Logger.warning(
|
||||
"Email uniqueness validation query failed for member email '#{email}': #{inspect(reason)}. Allowing operation to proceed (fail-open)."
|
||||
)
|
||||
|
||||
:ok
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue