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

Use a more specific type for error callbacks #132

Merged
merged 2 commits into from
Oct 20, 2023

Conversation

jzbrooks
Copy link
Contributor

Before submitting your PR: Please read through the contribution guide at https://github.com/connectrpc/connect-kotlin/blob/main/.github/CONTRIBUTING.md

Error callbacks are only ever called with ConnectException as arguments. Being more specific in these requests can tidy up call-sites in avoiding type assertions (as a hard cast to ConnectException) or overly generic handling where callers account for additional exception types that won't ever be used.

@pkwarren pkwarren merged commit 4f91ff9 into connectrpc:main Oct 20, 2023
7 checks passed
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 this pull request may close these issues.

2 participants