Wrap error messages into gettext helpers
This commit is contained in:
parent
26a6871609
commit
5104f65b69
24 changed files with 948 additions and 237 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue