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

Fast failing discovery on certain errors. #611

Merged
merged 2 commits into from
Oct 27, 2021

Conversation

robsdedude
Copy link
Member

@robsdedude robsdedude commented Oct 26, 2021

The driver tries its best to fetch a routing table. It will try all possible
routers while skipping routers on most errors. However, there are a few errors
that are caused by the client. Those errors should be surfaced to the user for
a better UX/DX and should fail fast: there is no reason to try another router
if we expect it tho return the same error.

Those errors are:

  • Neo.ClientError.Database.DatabaseNotFound
  • all Neo.ClientError.Security.*
    • except Neo.ClientError.Security.AuthorizationExpired
  • Neo.ClientError.Transaction.InvalidBookmark
  • Neo.ClientError.Transaction.InvalidBookmarkMixture

This PR also changes auth errors to be properly hydrated when received as HELLO response

The driver tries its best to fetch a routing table. It will try all possible
routers while skipping routers on most errors. However, there are a few errors
that are caused by the client. Those errors should be surfaced to the user for
a better UX/DX and should fail fast: there is no reason to try another router
if we expect it tho return the same error.

Those errors are:
 - `Neo.ClientError.Database.DatabaseNotFound`
 - all `Neo.ClientError.Security.*`
   - except `Neo.ClientError.Security.AuthorizationExpired`
 - `Neo.ClientError.Transaction.InvalidBookmark`
 - `Neo.ClientError.Transaction.InvalidBookmarkMixture`
@robsdedude robsdedude merged commit 7b9248d into neo4j:4.4 Oct 27, 2021
@robsdedude robsdedude deleted the fast-failing-discovery branch October 27, 2021 14:41
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.

1 participant