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.
Authentication errors happen during connection initialization when INIT message is send. Server validates provided credentials and then responds with either SUCCESS if credentials are fine or with FAILURE and closes the connection when credentials are wrong. Previously auth errors were not propagated to external observers (including those defined by user's Result promise). This means auth errors were only propagated to
Driver.onError
callback but all other places receivedServiceUnavailable
orSessionExpired
because of closed connection.This commit makes driver treat INIT error as fatal and corresponding connection as broken. Initialization error is memorized and propagated to all message observers. So they see specific failure reason and not generic
ServiceUnavailable
\SessionExpired
.Fixes #233