Improve Federation boundaries

This commit is contained in:
rustra
2020-01-23 21:59:50 +01:00
parent 8ca5c0b320
commit 3577fe42e1
67 changed files with 314 additions and 227 deletions

View File

@@ -0,0 +1,11 @@
defmodule MobilizonWeb.Auth.ErrorHandler do
@moduledoc """
In case we have an auth error
"""
import Plug.Conn
def auth_error(conn, {type, _reason}, _opts) do
body = Jason.encode!(%{message: to_string(type)})
send_resp(conn, 401, body)
end
end