Wrap error messages into gettext helpers

This commit is contained in:
Egor Kislitsyn 2019-07-10 16:25:58 +07:00
commit 5104f65b69
24 changed files with 948 additions and 237 deletions

View file

@ -245,14 +245,10 @@ defmodule Pleroma.Web.OStatus.OStatusController do
end
def errors(conn, {:error, :not_found}) do
conn
|> put_status(404)
|> text("Not found")
render_error(conn, :not_found, "Not found")
end
def errors(conn, _) do
conn
|> put_status(500)
|> text("Something went wrong")
render_error(conn, :internal_server_error, "Something went wrong")
end
end