We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The design of this client library seems unusual to me as querying requires checking two sources for error instead of an expected single source.
The documentation checks err from client.Execute() as well as nebula.IsError(resp) such as in the following code from the readme.
err
nebula.IsError(resp)
resp, err := client.Execute("SHOW HOSTS;") if err != nil { log.Fatal(err) } if nebula.IsError(resp) { log.Printf("ErrorCode: %v, ErrorMsg: %s", resp.GetErrorCode(), resp.GetErrorMsg()) }
Why are two sources of error checking done and not one?
My expectation would be a single check such as;
resp, err := client.Execute("SHOW HOSTS;") if err != nil { log.Printf("ErrorCode: %v, ErrorMsg: %s", resp.GetErrorCode(), resp.GetErrorMsg()) }
The text was updated successfully, but these errors were encountered:
Thank you for your feedback. We have updated the error handling, as the detailed design-relative changes are explained in #40
Please feel free to open new issues, feedbacks/suggestions are always welcome.
Sorry, something went wrong.
No branches or pull requests
The design of this client library seems unusual to me as querying requires checking two sources for error instead of an expected single source.
The documentation checks
err
from client.Execute() as well asnebula.IsError(resp)
such as in the following code from the readme.Why are two sources of error checking done and not one?
My expectation would be a single check such as;
The text was updated successfully, but these errors were encountered: