Add (and process at the top) SDK specific exceptions to distinguish errors #29
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.
DASSdkManager
to catch the guava cache exception one gets if the SDK throws an exception, so that the SDK exception propagates. Otherwise, whichever exception propagates. Therefore I removed the.setError
code to be consistent with the idea that errors are reported through gRPC errors.Caution
I believe we never hit
REGISTRATION_FAILED
in psql, since that one is made up from.error
instead of agRPC
failure. Maybe for backward compatibility we can instead leave it?Manually tried against that version of multicorn-das: raw-labs/multicorn-das#27 which modifies error handling during registration. With errors triggered in
DASMock
orDASMockTable
:If for example DASMock throws a
DASSdkUnauthenticatedException
in itsinitializer. That mimics a DAS instance that performs some authentication early
on, verifies the password, etc.
The effect is:
Similar with an invalid option.
If the error is unexpected (e.g. a bug in the DAS initializer,
NullPointerException
). The error isINTERNAL
.And if the DAS server is down, after 30 attempts:
If the error occurs after registration, e.g. when running
.execute
of aDASTable
.