Allow GraphQL Error handler return custom Mobilizon.GraphQL.Error
directly Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
d075522f75
commit
29062ff883
@ -72,6 +72,8 @@ defmodule Mobilizon.GraphQL.Error do
|
||||
}
|
||||
end
|
||||
|
||||
defp handle(%Error{} = error), do: error
|
||||
|
||||
# ... Handle other error types here ...
|
||||
defp handle(other) do
|
||||
Logger.error("Unhandled error term:\n#{inspect(other)}")
|
||||
|
Loading…
Reference in New Issue
Block a user