mirror of
https://github.com/mgerb/classic-wow-forums
synced 2026-01-10 09:02:50 +00:00
11 lines
213 B
Elixir
11 lines
213 B
Elixir
defmodule MyApp.Auth.ErrorHandler do
|
|
import Plug.Conn
|
|
alias MyAppWeb.Response
|
|
|
|
def auth_error(conn, {type, _reason}, _opts) do
|
|
conn
|
|
|> put_status(401)
|
|
|> Response.json(to_string(type))
|
|
end
|
|
end
|