forked from potsda.mn/mobilizon
Don't return error 500 when issue with media proxy
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
a49bda5e4c
commit
de5a5345b6
|
@ -131,7 +131,7 @@ defmodule Mobilizon.Web.ReverseProxy do
|
|||
Logger.warn("Tried to reverse proxy URL #{inspect(url)}")
|
||||
|
||||
conn
|
||||
|> error_or_redirect(url, 500, "Request failed", opts)
|
||||
|> error_or_redirect(url, 400, "Request failed", opts)
|
||||
|> halt()
|
||||
|
||||
{:error, {:invalid_http_response, code}} ->
|
||||
|
@ -150,7 +150,7 @@ defmodule Mobilizon.Web.ReverseProxy do
|
|||
Logger.error("#{__MODULE__}: request to #{inspect(url)} failed: #{inspect(error)}")
|
||||
|
||||
conn
|
||||
|> error_or_redirect(url, 500, "Request failed", opts)
|
||||
|> error_or_redirect(url, 400, "Request failed", opts)
|
||||
|> halt()
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue