Skip to content
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

Merged
merged 5 commits into from
Sep 14, 2023
Merged

Conversation

xvello
Copy link
Contributor

@xvello xvello commented Sep 14, 2023

  • Introduce a CaptureError enum for error handling, using thiserror for easy instantiation. It should eventually reference several smaller enums (one per subsystem), but let's KISS for now.
  • Implement IntoResponse for this enum to allow us to control the returned status codes
  • The Display implem is used as the http response body, so it lacks context. We are emitting tracing::error where we lose the error for now.
  • Kafkasink detects 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.

@xvello xvello marked this pull request as ready for review September 14, 2023 13:20
Copy link
Contributor

@ellie ellie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@xvello xvello merged commit 76905ec into main Sep 14, 2023
4 checks passed
@xvello xvello deleted the xvello/thiserror branch September 14, 2023 13:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants