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

Remove AcceptedErrorCodes from MirrorNodeClient - GET_ACCOUNTS_BY_ID_ENDPOINT #1366

Closed

Conversation

AlfredoG87
Copy link
Collaborator

@AlfredoG87 AlfredoG87 commented Jun 15, 2023

Description:
Refactored code around MirrorNodeClient calls to GET_ACCOUNTS_BY_ID_ENDPOINT so it does not return null, but instead throws the corresponding error and the methods that consume that endpoint handle the errors as they see fit.
Related issue(s):
#1276
Fixes

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@AlfredoG87 AlfredoG87 self-assigned this Jun 15, 2023
@AlfredoG87 AlfredoG87 added the P2 label Jun 15, 2023
@AlfredoG87 AlfredoG87 added this to the 0.26.0 milestone Jun 15, 2023
@AlfredoG87 AlfredoG87 marked this pull request as ready for review June 15, 2023 23:30
@AlfredoG87 AlfredoG87 requested review from ebadiere, lukelee-sl and a team as code owners June 15, 2023 23:30
packages/relay/src/lib/eth.ts Outdated Show resolved Hide resolved
packages/relay/src/lib/eth.ts Outdated Show resolved Hide resolved
Nana-EC
Nana-EC previously approved these changes Jun 17, 2023
@Nana-EC Nana-EC added the enhancement New feature or request label Jun 17, 2023
@AlfredoG87 AlfredoG87 force-pushed the 1276-reduce-accepted-error-codes-on-mirror-node-calls branch from bf27860 to 64f4f3e Compare June 21, 2023 23:51
@codecov-commenter
Copy link

codecov-commenter commented Jun 21, 2023

Codecov Report

Patch coverage: 79.31% and project coverage change: +1.15 🎉

Comparison is base (a3e5064) 77.31% compared to head (5336acd) 78.46%.

❗ Current head 5336acd differs from pull request most recent head 3b91760. Consider uploading reports for the commit 3b91760 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1366      +/-   ##
==========================================
+ Coverage   77.31%   78.46%   +1.15%     
==========================================
  Files          32       19      -13     
  Lines        2561     2039     -522     
  Branches      531      435      -96     
==========================================
- Hits         1980     1600     -380     
+ Misses        414      307     -107     
+ Partials      167      132      -35     
Impacted Files Coverage Δ
packages/relay/src/lib/eth.ts 85.39% <77.27%> (-0.34%) ⬇️
packages/relay/src/lib/precheck.ts 86.51% <83.33%> (-0.84%) ⬇️
packages/relay/src/lib/clients/mirrorNodeClient.ts 89.56% <100.00%> (ø)

... and 13 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Nana-EC
Nana-EC previously approved these changes Jun 22, 2023
…NDPOINT, so it does not return null, but instead throws the corresponding error and the methods that consume that endpoint handle the errors as they see fit.

Signed-off-by: Alfredo Gutierrez <alfredo@swirldslabs.com>
@AlfredoG87 AlfredoG87 force-pushed the 1276-reduce-accepted-error-codes-on-mirror-node-calls branch from 64f4f3e to 3b91760 Compare June 22, 2023 04:14
@sonarcloud
Copy link

sonarcloud bot commented Jun 22, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@AlfredoG87 AlfredoG87 modified the milestones: 0.26.0, 0.27.0 Jun 23, 2023
@Nana-EC
Copy link
Collaborator

Nana-EC commented Jun 29, 2023

@AlfredoG87 should rebase this so we can get it in

@AlfredoG87
Copy link
Collaborator Author

closed in favor of this one: #1649

@AlfredoG87 AlfredoG87 closed this Aug 18, 2023
@AlfredoG87 AlfredoG87 deleted the 1276-reduce-accepted-error-codes-on-mirror-node-calls branch August 23, 2023 15:58
@ebadiere ebadiere modified the milestones: 0.30.0, 0.31.1 Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants