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: improve error responses #542

Merged
merged 5 commits into from
Oct 30, 2024
Merged

feat: improve error responses #542

merged 5 commits into from
Oct 30, 2024

Conversation

eiri
Copy link
Member

@eiri eiri commented Oct 23, 2024

PR summary

This PR adds a new RoundTripper to augment error messages and adds it to http client in middleware fashion at creation of BaseService or at SetHTTPClient call.

The change covered by new test suite.

PR Checklist

Please make sure that your PR fulfills the following requirements:

  • The commit message follows the
    Angular Commit Message Guidelines.
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • New tests
  • Build/CI related changes
  • Documentation content changes
  • Other (please describe)

What is the current behavior?

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Copy link
Member

@ricellis ricellis left a comment

Choose a reason for hiding this comment

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

A few questions/nits

base/cloudant_base.go Show resolved Hide resolved
base/cloudant_base_test.go Outdated Show resolved Hide resolved
base/cloudant_base_test.go Outdated Show resolved Hide resolved
base/cloudant_base_test.go Outdated Show resolved Hide resolved
base/error_response_transport.go Show resolved Hide resolved
Copy link
Member

@ricellis ricellis left a comment

Choose a reason for hiding this comment

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

I'm +1 here, but we need a second opinion.

@emlaver emlaver self-requested a review October 29, 2024 14:50
Copy link
Contributor

@emlaver emlaver left a comment

Choose a reason for hiding this comment

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

Looks good!

eiri and others added 5 commits October 30, 2024 09:30
This PR adds a new RoundTripper to augment error messages and adds it
to http client in middleware fashion at creation of  BaseService
or at SetHTTPClient call.

The change covered by new test suite.
Co-authored-by: Rich Ellis <[email protected]>
Signed-off-by: Eric Avdey <[email protected]>
@eiri eiri merged commit d63e5db into main Oct 30, 2024
7 checks passed
@eiri eiri deleted the s1004-error-augmentation branch October 30, 2024 17:35
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.

3 participants