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

feat: introduce error codes #126

Closed
wants to merge 1 commit into from
Closed

Conversation

abuchanan-airbyte
Copy link
Collaborator

Introduce error codes to the telemetry for easier tracking.

@abuchanan-airbyte abuchanan-airbyte requested a review from a team as a code owner September 18, 2024 21:16
@@ -172,3 +174,13 @@ type body struct {
Timestamp string `json:"timestamp"`
WriteKey string `json:"writeKey"`
}

func findErrorCode(properties map[string]string, err error) {
if v, ok := err.(interface{ErrorCode() string}); ok {
Copy link
Member

Choose a reason for hiding this comment

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

Should we introduce this as a formal interface?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

🤷 this is a pretty standard Go pattern. You want a public interface?

@abuchanan-airbyte
Copy link
Collaborator Author

I'm actually going to hold off on this for now. I might improve it and come back with a better version later, but also the error cases in the telemetry are working fairly well at this point.

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