mastodon websocket: return errors using ok, not stop
This commit is contained in:
parent
388a3f4ca2
commit
28b4093233
@ -37,12 +37,12 @@ defmodule Pleroma.Web.MastodonAPI.WebsocketHandler do
|
|||||||
{:error, code} ->
|
{:error, code} ->
|
||||||
Logger.debug("#{__MODULE__} denied connection: #{inspect(code)} - #{inspect(req)}")
|
Logger.debug("#{__MODULE__} denied connection: #{inspect(code)} - #{inspect(req)}")
|
||||||
{:ok, req} = :cowboy_req.reply(code, req)
|
{:ok, req} = :cowboy_req.reply(code, req)
|
||||||
{:stop, req}
|
{:ok, req, state}
|
||||||
|
|
||||||
error ->
|
error ->
|
||||||
Logger.debug("#{__MODULE__} denied connection: #{inspect(error)} - #{inspect(req)}")
|
Logger.debug("#{__MODULE__} denied connection: #{inspect(error)} - #{inspect(req)}")
|
||||||
{:ok, req} = :cowboy_req.reply(400, req)
|
{:ok, req} = :cowboy_req.reply(400, req)
|
||||||
{:stop, req}
|
{:ok, req, state}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user