Skip to content

Commit

Permalink
fix: return adapter error instead of wrapped string (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
polvalente authored Jul 19, 2022
1 parent 63096c3 commit a0ac3b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/grpc/adapter/gun.ex
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ defmodule GRPC.Adapter.Gun do

{:error, reason} ->
:gun.shutdown(conn_pid)
{:error, "Error when opening connection: #{inspect(reason)}"}
{:error, reason}
end
end

Expand Down Expand Up @@ -135,7 +135,7 @@ defmodule GRPC.Adapter.Gun do
{:response, headers, fin} ->
{:ok, headers, fin}

error = {:error, _} ->
{:error, _} = error ->
error

other ->
Expand All @@ -155,7 +155,7 @@ defmodule GRPC.Adapter.Gun do
trailers = {:trailers, _} ->
trailers

error = {:error, _} ->
{:error, _} = error ->
error

other ->
Expand Down

0 comments on commit a0ac3b2

Please sign in to comment.