Handle 406 Not acceptable when asking for JSON on an AP entity better

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-04-21 10:47:32 +02:00
parent fc94651577
commit fc5adedf0b
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
1 changed files with 4 additions and 0 deletions

View File

@ -43,6 +43,10 @@ defmodule Mobilizon.Web.ErrorView do
}
end
def render("406.json", _assigns) do
%{msg: "Not acceptable"}
end
def render("500.html", assigns) do
Mobilizon.Config.instance_config()
|> Keyword.get(:default_language, "en")