From bbfe3de471ee25d17a48a49ae5aa64eefb77e55b Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 9 Apr 2021 11:57:53 +0200 Subject: [PATCH] Handle NotAcceptableError better Signed-off-by: Thomas Citharel --- lib/web/plugs/not_acceptable_error.ex | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 lib/web/plugs/not_acceptable_error.ex diff --git a/lib/web/plugs/not_acceptable_error.ex b/lib/web/plugs/not_acceptable_error.ex new file mode 100644 index 000000000..0b1556c4e --- /dev/null +++ b/lib/web/plugs/not_acceptable_error.ex @@ -0,0 +1,4 @@ +defimpl Plug.Exception, for: Phoenix.NotAcceptableError do + def status(_exception), do: 406 + def actions(_exception), do: [] +end