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

fix(api): failover error bugs #858

Merged
merged 4 commits into from
Nov 1, 2024
Merged

Conversation

samlaf
Copy link
Contributor

@samlaf samlaf commented Nov 1, 2024

Why are these changes needed?

2 big bugs in my ErrorFailover implementation:

  1. I misunderstood how errors.Is works, so could only compare if the underlying wrapped error was exactly equal, which is not useful (and made the logic in disperser/eigenda-clients incorrect)
  2. err.Error() would panic when ErrorFailover{} was created with a nil wrapped error

Added tests to make sure the above are fixed, forever.

Checks

  • I've made sure the lint is passing in this PR.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • I've checked the new test coverage and the coverage percentage didn't drop.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

@samlaf samlaf requested a review from bxue-l2 November 1, 2024 19:29
@samlaf samlaf merged commit 98a8e72 into master Nov 1, 2024
9 checks passed
@samlaf samlaf deleted the samlaf/fix--failover-error-bug branch November 1, 2024 20:15
api/errors.go Show resolved Hide resolved
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