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

Detect Fireblocks http timeout error #448

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

ian-shim
Copy link
Contributor

@ian-shim ian-shim commented Apr 4, 2024

Why are these changes needed?

The http client does not wrap the error but concatenates error strings, which doesn't let the err unwrap.
All errors from the client will be url.Error type which supports Timeout() method to tell whether the request timed out.
This PR uses this method to tell whether the request timed out, instead of unwrapping the error using errors.Is.

See playground here

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.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

@ian-shim ian-shim marked this pull request as ready for review April 4, 2024 23:19
@ian-shim ian-shim merged commit 17ca265 into Layr-Labs:master Apr 8, 2024
6 checks passed
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