This repository has been archived by the owner on Feb 8, 2024. It is now read-only.
implement error handling with a CaptureError enum #24
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.
CaptureError
enum for error handling, usingthiserror
for easy instantiation. It should eventually reference several smaller enums (one per subsystem), but let's KISS for now.IntoResponse
for this enum to allow us to control the returned status codesDisplay
implem is used as the http response body, so it lacks context. We are emittingtracing::error
where we lose the error for now.InvalidMessageSize
kafka errors and returns a non-retriable error for it. Breaking change from capture.py, but I think it's justified. Currently, clients will retry several times then drop.