Skip to content

feat: Introduce TransportError #259

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

Merged
merged 6 commits into from
May 30, 2025

Conversation

isSerge
Copy link
Contributor

@isSerge isSerge commented May 28, 2025

Summary

This PR introduces TransportError and replaces anyhow errors in send_raw_request methods.
This is a necessary step to improve error parsing, briefly discussed in #242

Testing Process

Checklist

  • Add a reference to related issues in the PR description.
  • Add unit tests if applicable.
  • Add integration tests if applicable.
  • Add property-based tests if applicable.
  • Update documentation if applicable.

…nTransport` trait and `EndpointManager`, update mocks and tests
Copy link

codecov bot commented May 28, 2025

Codecov Report

Attention: Patch coverage is 93.77778% with 14 lines in your changes missing coverage. Please review.

Project coverage is 96.0%. Comparing base (05a1b54) to head (604b5ff).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...services/blockchain/transports/endpoint_manager.rs 84.0% 8 Missing ⚠️
src/services/blockchain/transports/error.rs 96.5% 6 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main    #259     +/-   ##
=======================================
- Coverage   96.0%   96.0%   -0.1%     
=======================================
  Files         66      67      +1     
  Lines      20002   20206    +204     
=======================================
+ Hits       19213   19404    +191     
- Misses       789     802     +13     
Flag Coverage Δ
integration 59.5% <84.3%> (+0.3%) ⬆️
properties 20.7% <0.0%> (-0.3%) ⬇️
unittests 85.3% <75.1%> (-0.1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@shahnami shahnami 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! Thanks for the improvement.

Could you just tackle a few of the missing coverage lines in endpoint_manager?

They seem like an easy-win for our overall coverage.

Copy link
Contributor

@NicoMolinaOZ NicoMolinaOZ left a comment

Choose a reason for hiding this comment

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

LGTM! thanks @isSerge!

@isSerge
Copy link
Contributor Author

isSerge commented May 29, 2025

@shahnami I have added additional test for TransportError::UrlRotation, but not sure I can cover TransportError::RequestSerialization - it is quite difficult (if possible) to simulate this error within current setup

@shahnami shahnami merged commit 0e04cfb into OpenZeppelin:main May 30, 2025
15 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators May 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants