From 0f7eef86384495fba1241f0e9cf6f5aa2e8e738e Mon Sep 17 00:00:00 2001 From: Paulo Valente <16843419+polvalente@users.noreply.github.com> Date: Tue, 19 Jul 2022 12:59:02 -0300 Subject: [PATCH] fix: return adapter error instead of wrapped string --- lib/grpc/adapter/gun.ex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/grpc/adapter/gun.ex b/lib/grpc/adapter/gun.ex index bd7234aa..13f002b8 100644 --- a/lib/grpc/adapter/gun.ex +++ b/lib/grpc/adapter/gun.ex @@ -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 @@ -135,7 +135,7 @@ defmodule GRPC.Adapter.Gun do {:response, headers, fin} -> {:ok, headers, fin} - error = {:error, _} -> + {:error, _} = error -> error other -> @@ -155,7 +155,7 @@ defmodule GRPC.Adapter.Gun do trailers = {:trailers, _} -> trailers - error = {:error, _} -> + {:error, _} = error -> error other ->