Skip to content

Commit

Permalink
fix: only ever raise error classes
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Dec 18, 2024
1 parent b136825 commit 5b30c97
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/ash_phoenix/form/form.ex
Original file line number Diff line number Diff line change
Expand Up @@ -758,16 +758,16 @@ defmodule AshPhoenix.Form do
tenant: form.source.tenant
) do
{:ok, false, %{stacktrace: %{stacktrace: stacktrace}} = exception} ->
reraise exception, stacktrace
reraise Ash.Error.to_error_class(exception, stacktrace: stacktrace), stacktrace

{:error, %{stacktrace: %{stacktrace: stacktrace}} = exception} ->
reraise exception, stacktrace
reraise Ash.Error.to_error_class(exception, stacktrace: stacktrace), stacktrace

{:ok, false, exception} ->
raise exception
raise Ash.Error.to_error_class(exception)

{:error, exception} ->
raise exception
raise Ash.Error.to_error_class(exception)

{:ok, true} ->
form
Expand Down

0 comments on commit 5b30c97

Please sign in to comment.