From cee19e2a101fd39745f63e0f9ce94bc9617e1965 Mon Sep 17 00:00:00 2001 From: Serge Tupchii Date: Fri, 17 May 2024 13:24:43 +0300 Subject: [PATCH] fix: return any possible error reasons from `greptimedb:is_alive(Client, true)` grpcbox may return `{http_error, _, _}` which doesn't match `{error, Reason}` pattern. --- src/greptimedb.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/greptimedb.erl b/src/greptimedb.erl index 23db644..6b654d5 100644 --- a/src/greptimedb.erl +++ b/src/greptimedb.erl @@ -182,5 +182,7 @@ rpc_write_stream(#{pool := Pool, cli_opts := Options} = _Client) -> maybe_return_reason({error, Reason}, true) -> {false, Reason}; +maybe_return_reason(Error, true) -> + {false, Error}; maybe_return_reason(_, _) -> false.