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

Feature: Adding standardize response error #225

Merged

Conversation

MovieStoreGuy
Copy link
Collaborator

Context

To help simplify and address how errors from responses are handled, this returns an error type that allows for deeper introspection from external packages.

This is helpful in projects like the signalfx-terraform-provider since it currently determines type of error by searching the error message for the expected status code, this could improve by returning a more complex error type to provide the improved level of introspection.

Changes

  • Standardize all response errors by adopting ResponseError
  • Adding new error type ResponseError with methods to create and inspect.
  • Removed check for resp not being nil to close body.

@MovieStoreGuy MovieStoreGuy requested review from echoi-splk and a team as code owners October 23, 2024 07:03
@MovieStoreGuy MovieStoreGuy force-pushed the msg/none-add-fixed-errors branch from ee9faec to 7424c54 Compare October 23, 2024 22:38
@MovieStoreGuy
Copy link
Collaborator Author

Requires #226

To help simplify and address how errors from request are handled, this
returns an error type that allows for deeper introspection from external
packages.
@MovieStoreGuy MovieStoreGuy force-pushed the msg/none-add-fixed-errors branch from 8d7ceb7 to 00bf849 Compare October 24, 2024 02:46
@MovieStoreGuy MovieStoreGuy merged commit 1b58bfc into signalfx:master Oct 24, 2024
2 checks passed
@MovieStoreGuy MovieStoreGuy deleted the msg/none-add-fixed-errors branch October 24, 2024 04:56
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