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

feat: clearer error messages when not using block #1393

Merged
merged 9 commits into from
Aug 28, 2023

Conversation

bittermandel
Copy link
Contributor

@bittermandel bittermandel commented Aug 4, 2023

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 log NOT_SERVING and return 0, rather than Unable 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

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    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.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

@CLAassistant
Copy link

CLAassistant commented Aug 4, 2023

CLA assistant check
All committers have signed the CLA.

@bittermandel bittermandel marked this pull request as ready for review August 4, 2023 15:26
Copy link
Collaborator

@hperl hperl left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for your contribution!

@hperl hperl enabled auto-merge August 25, 2023 06:40
@hperl hperl added this pull request to the merge queue Aug 28, 2023
Merged via the queue into ory:master with commit a3b5494 Aug 28, 2023
24 checks passed
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.

None yet

3 participants