Skip to content

Refactor errors to expose a kind & meta field separately #249

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

Merged
merged 7 commits into from
Mar 16, 2021
Merged

Conversation

rcoh
Copy link
Collaborator

@rcoh rcoh commented Mar 11, 2021

Issue #, if available: Fixes #110 Fixes #111

Description of changes: This diff improves our errors by introducing a kind field that captures the variant separately from meta which captures metadata about the error (eg. request id).

This is on the path to adding a top-level error for the entire service. Operations will return the errors as they do now, but they will all be convertible into the top level error. This is to facilitate generic error handling across operations.

I also simplified and optimized the implementation of retryable_error_kind, cutting out about 1k lines of generated code

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Generated code diff for context: main-generated...error-kind-generated

@rcoh rcoh requested a review from a team March 12, 2021 00:07
@rcoh rcoh merged commit 90f116c into main Mar 16, 2021
@rcoh rcoh deleted the error-kind branch March 16, 2021 19:11
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.

Request id deserialization request id deserialization
2 participants