From 48f52ba4fd65f4e4644cb845d8025a74a5af9100 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 24 Mar 2021 11:38:31 +0100 Subject: [PATCH] Handle duplicate usernames correctly Signed-off-by: Thomas Citharel --- lib/graphql/resolvers/person.ex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/graphql/resolvers/person.ex b/lib/graphql/resolvers/person.ex index 09f0aab1..2fb45e21 100644 --- a/lib/graphql/resolvers/person.ex +++ b/lib/graphql/resolvers/person.ex @@ -124,6 +124,9 @@ defmodule Mobilizon.GraphQL.Resolvers.Person do {:ok, %Actor{} = new_person} <- Actors.new_person(args) do {:ok, new_person} else + {:error, err} -> + {:error, err} + {:picture, {:error, :file_too_large}} -> {:error, dgettext("errors", "The provided picture is too heavy")} end