Allow GraphQL Error handler return custom Mobilizon.GraphQL.Error

directly

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-03-24 16:20:33 +01:00
parent 45ce7d52b0
commit 93425108c5
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
1 changed files with 2 additions and 0 deletions

View File

@ -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)}")