fix(discussions): handle changeset errors when updating discussion

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2023-06-20 14:49:18 +02:00
parent f2ffcfec5b
commit ca06ec397f
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
1 changed files with 3 additions and 0 deletions

View File

@ -195,6 +195,9 @@ defmodule Mobilizon.GraphQL.Resolvers.Discussion do
else
{:member, false} ->
{:error, :unauthorized}
{:error, %Ecto.Changeset{} = err} ->
{:error, err}
end
end