When mercury is disconnected while still trying to connect, a "Mercury Connection Aborted" error is thrown. By keeping track of the last error causing a retry, the client can get more information about why mercury had not yet connected.
by making the following changes
Set this.lastError when the backoff callback is called with an error. Added mercury.getLastError() to return it.
Change Type
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[X] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Documentation update
[ ] Tooling change
[ ] Internal code refactor
The following scenarios where tested
Tested manually with local cantina and updated tests.
COMPLETES #SPARK-517229
This pull request addresses
When mercury is disconnected while still trying to connect, a "Mercury Connection Aborted" error is thrown. By keeping track of the last error causing a retry, the client can get more information about why mercury had not yet connected.
by making the following changes
Set
this.lastError
when the backoff callback is called with an error. Addedmercury.getLastError()
to return it.Change Type
The following scenarios where tested
Tested manually with local cantina and updated tests.
I certified that
[X] I have read and followed contributing guidelines
[X] I discussed changes with code owners prior to submitting this pull request
[X] I have not skipped any automated checks
[X] All existing and new tests passed
[ ] I have updated the documentation accordingly
Make sure to have followed the contributing guidelines before submitting.