forked from potsda.mn/mobilizon
Allow GraphQL Error handler return custom Mobilizon.GraphQL.Error
directly Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
45ce7d52b0
commit
93425108c5
|
@ -72,6 +72,8 @@ defmodule Mobilizon.GraphQL.Error do
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
defp handle(%Error{} = error), do: error
|
||||||
|
|
||||||
# ... Handle other error types here ...
|
# ... Handle other error types here ...
|
||||||
defp handle(other) do
|
defp handle(other) do
|
||||||
Logger.error("Unhandled error term:\n#{inspect(other)}")
|
Logger.error("Unhandled error term:\n#{inspect(other)}")
|
||||||
|
|
Loading…
Reference in a new issue