Make more error codes fail fast during the rediscovery #536
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.
(Most) drivers will try really hard to fetch a valid RT. This entails going to the next know router if the previous one failed. In this process many errors that are considered unrecoverable in the transaction context are considered retryable. However, a hand full of errors should not be retried to improve user experience. Namely those, that are caused by malformed user-input. Instead of asking all routers if they can make sense of it and ultimately failing with a generic routing update error, it's better to fail fast and give the raw error of the server to the user.
Currently, these errors are
Neo.ClientError.Database.DatabaseNotFound
Neo.ClientError.Transaction.InvalidBookmark
Neo.ClientError.Transaction.InvalidBookmarkMixture
Added three more:
Neo.ClientError.Statement.ArgumentError
: this happens on failed attempts of impersonation (user or permissions missing)Neo.ClientError.Request.Invalid
: this happens when trying things like impersonating an integerNeo.ClientError.Statement.TypeError
: this happens when trying things like set a database as an integer in bolt implementation which doesn't supportROUTE