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

Prefer inspectable objects in errors over Strings #427

Open
Shadow53 opened this issue Jan 23, 2024 · 1 comment · May be fixed by #431
Open

Prefer inspectable objects in errors over Strings #427

Shadow53 opened this issue Jan 23, 2024 · 1 comment · May be fixed by #431
Assignees

Comments

@Shadow53
Copy link
Contributor

The SDK does not differentiate between gRPC status codes received e.g. during translation, and converts all of them into string messages. This makes it difficult for consumers to detect when the failure is a transient one that should succeed after a couple tries, such as when the translation backend is under load and temporarily rejects new requests.

@Shadow53 Shadow53 self-assigned this Jan 23, 2024
@Shadow53 Shadow53 changed the title Add special error for load shedding Prefer inspectable objects in errors over Strings Jan 26, 2024
@Shadow53
Copy link
Contributor Author

Shadow53 commented Jan 26, 2024

After hacking on this locally, I've determined there isn't a good way to implement retrying in a centralized way until hyperium/tonic#733 is resolved. Even then, such a centralized implementation should live in the API client packages rather than the higher-level SDK.

Until then, a simpler way to handle this in the SDK is to expose the actual gRPC Status through the error instead of converting into a String.

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 a pull request may close this issue.

1 participant