Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: return any possible error reasons from greptimedb:is_alive(Client, true) #40

Merged

Conversation

SergeTupchiy
Copy link
Contributor

Hi team,

A tiny improvement for is_alive(Client, true).
I think if a caller requested ReturnReason, it's better to ensure the Reason is always returned, even if the error itself doesn't match {error, Reason} pattern.

The later may happen in a real world scenario, since grpcbox also returns {http_error, _, _} which doesn't match {error, Reason}: https://github.com/tsloughter/grpcbox/blob/v0.17.1/src/grpcbox_client.erl#L104

…nt, true)`

grpcbox may return `{http_error, _, _}` which doesn't match `{error, Reason}` pattern.
Copy link
Contributor

@killme2008 killme2008 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Thank you.

@killme2008 killme2008 merged commit 07f11be into GreptimeTeam:main May 17, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants