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

Consider creating a custom error type #217

Open
laurenzlong opened this issue Apr 15, 2024 · 0 comments
Open

Consider creating a custom error type #217

laurenzlong opened this issue Apr 15, 2024 · 0 comments

Comments

@laurenzlong
Copy link
Contributor

It might be a good idea for the deeper connector methods (Read, Write, etc.) to return a custom error type instead of error when there's an error encountered, for example:

type ConnectorError struct {
	StatusCode int // original status code from the provider API
        Raw any // original response body from the provider API
	Err error
}
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

No branches or pull requests

1 participant