Skip to content

Commit

Permalink
Cast exception to message on send error, closes #2679 (#2680)
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim authored and jonatanklosko committed Jun 25, 2024
1 parent 7854cff commit 68ecd37
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/livebook/teams/web_socket.ex
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ defmodule Livebook.Teams.WebSocket do
{:ok, conn} <- Mint.WebSocket.stream_request_body(conn, ref, data) do
{:ok, conn, websocket}
else
{:error, %Mint.HTTP1{} = conn, reason} ->
{:error, conn, websocket, reason}
{:error, %Mint.HTTP1{} = conn, exception} when is_exception(exception) ->
{:error, conn, websocket, Exception.message(exception)}

{:error, websocket, reason} ->
{:error, conn, websocket, reason}
{:error, websocket, exception} when is_exception(exception) ->
{:error, conn, websocket, Exception.message(exception)}
end
end
end

0 comments on commit 68ecd37

Please sign in to comment.