Skip to content

Commit

Permalink
Rescue StaleError in user update function when abilities are present (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
CDimonaco authored and arbulu89 committed Jun 25, 2024
1 parent 83a4303 commit 38e43c9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/trento/users.ex
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ defmodule Trento.Users do
{:error, _, changeset_error, _} ->
{:error, changeset_error}
end
rescue
Ecto.StaleEntryError -> {:error, :stale_entry}
end

defp do_update(user, attrs) do
Expand Down

0 comments on commit 38e43c9

Please sign in to comment.