Skip to content

Commit

Permalink
Surface socket setup errors as Bandit.TransportError for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrudel committed Dec 18, 2024
1 parent 4ea5442 commit 7c7dcae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/bandit/transport_info.ex
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ defmodule Bandit.TransportInfo do
peercert: peercert
}
else
{:error, reason} -> raise "Unable to obtain transport_info: #{inspect(reason)}"
{:error, reason} ->
raise Bandit.TransportError, message: "Unable to obtain transport_info", reason: reason
end
end

Expand Down

0 comments on commit 7c7dcae

Please sign in to comment.