feat: clearer error messages when not using block #1393
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using
keto status
to check server health, it is not clear why the server might not be healthy. For example, if accessing the server through an insecure connection, the command would logNOT_SERVING
and return 0, rather thanUnable to get a check response: rpc error: code = Unavailable desc = connection error: desc = "transport: authentication handshake failed: EOF
with exit status 255.This PR improves this slightly by logging the actual error that the gRPC client returns rather than wrapping it in a NOT_SERVING error. It also makes sure that the status command respects block and doesn't add a timeout by default, as otherwise the error will always be "Context deadline exceeded".
I am very happy to chat about how I can add sufficient docs and tests for these changes!
PS: The quality of this PR can most likely be improved and I'm happy to take feedback on how to do that.
Related issue(s)
Checklist
introduces a new feature.
contributing code guidelines.
vulnerability. If this pull request addresses a security vulnerability, I
confirm that I got the approval (please contact
security@ory.sh) from the maintainers to push
the changes.
works.