Skip to content

Commit

Permalink
Don't crash on errors from the adapter (#175)
Browse files Browse the repository at this point in the history
Co-authored-by: Paulo Valente <[email protected]>

closes #188
  • Loading branch information
frekw authored Jul 16, 2022
1 parent 11a2e05 commit 73ab681
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/grpc/stub.ex
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ defmodule GRPC.Stub do
{status, msg}
end
else
error = {:error, _} ->
{:error, _} = error ->
error
end
end
Expand All @@ -465,6 +465,9 @@ defmodule GRPC.Stub do

{:trailers, trailers} ->
{:ok, acc, GRPC.Transport.HTTP2.decode_headers(trailers)}

err ->
err
end
end

Expand Down

0 comments on commit 73ab681

Please sign in to comment.