Constraint error when trying to follow users on federated instances
When trying to do follow a user on a remote instance, e.g. https://mastodon.social/users/Gargron/remote_follow I get the following in my error log:
Dec 21 23:00:31 li457-242 pleroma[1211]: 23:00:31.289 request_id=FeKFKSSVfZj7coYB2ZEh [error] Internal server error: %Ecto.ConstraintError{constraint: "users_nickname_index", message: "constraint error when attempting to insert struct:\n\n * users_nickname_index (unique_constraint)\n\nIf you would like to stop this constraint violation from raising an\nexception and instead add it as an error to your changeset, please\ncall `unique_constraint/3` on your changeset with the constraint\n`:name` as an option.\n\nThe changeset has not defined any constraint.\n", type: :unique}
Dec 21 23:00:31 li457-242 pleroma[1211]: 23:00:31.293 [error] #PID<0.19917.126> running Pleroma.Web.Endpoint (connection #PID<0.19912.126>, stream id 1) terminated
Dec 21 23:00:31 li457-242 pleroma[1211]: Server: www.extropian.net:80 (http)
Dec 21 23:00:31 li457-242 pleroma[1211]: Request: GET /ostatus_subscribe?acct=https%3A%2F%2Fmastodon.social%2Fusers%2FGargron
Dec 21 23:00:31 li457-242 pleroma[1211]: ** (exit) an exception was raised:
Dec 21 23:00:31 li457-242 pleroma[1211]: ** (Protocol.UndefinedError) protocol Phoenix.HTML.Safe not implemented for %{errors: %{detail: "Internal server error"}} of type Map. This protocol is implemented for the following type(s): Decimal, Phoenix.HTML.Form, Integer, BitString, Date, List, Atom, Time, DateTime, NaiveDateTime, Tuple, Float
Dec 21 23:00:31 li457-242 pleroma[1211]: (phoenix_html) lib/phoenix_html/safe.ex:1: Phoenix.HTML.Safe.impl_for!/1
Dec 21 23:00:31 li457-242 pleroma[1211]: (phoenix_html) lib/phoenix_html/safe.ex:15: Phoenix.HTML.Safe.to_iodata/1
Dec 21 23:00:31 li457-242 pleroma[1211]: (phoenix) lib/phoenix/controller.ex:729: Phoenix.Controller.__put_render__/5
Dec 21 23:00:31 li457-242 pleroma[1211]: (phoenix) lib/phoenix/endpoint/render_errors.ex:77: Phoenix.Endpoint.RenderErrors.instrument_render_and_send/5
Dec 21 23:00:31 li457-242 pleroma[1211]: (phoenix) lib/phoenix/endpoint/render_errors.ex:62: Phoenix.Endpoint.RenderErrors.__catch__/5
Dec 21 23:00:31 li457-242 pleroma[1211]: (phoenix) lib/phoenix/endpoint/cowboy2_handler.ex:40: Phoenix.Endpoint.Cowboy2Handler.init/2
Dec 21 23:00:31 li457-242 pleroma[1211]: (cowboy) /builds/pleroma/pleroma/deps/cowboy/src/cowboy_handler.erl:41: :cowboy_handler.execute/2
Dec 21 23:00:31 li457-242 pleroma[1211]: (cowboy) /builds/pleroma/pleroma/deps/cowboy/src/cowboy_stream_h.erl:296: :cowboy_stream_h.execute/3