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: add optional fallbackNodeUrls property to RpcProvider #927

Closed
wants to merge 3 commits into from
Closed

feat: add optional fallbackNodeUrls property to RpcProvider #927

wants to merge 3 commits into from

Conversation

piwonskp
Copy link
Contributor

@piwonskp piwonskp commented Jan 18, 2024

Motivation and Resolution

Solve issue #872. The PR replaces #905. PR targetting v6: #953

RPC version (if applicable)

...

Usage related changes

Development related changes

Checklist:

  • Performed a self-review of the code
  • Rebased to the last commit of the target branch (or merged it into my branch)
  • Linked the issues which this PR resolves
  • Documented the changes in code (API docs will be generated automatically)
  • Updated the tests
  • All tests are passing

Copy link

netlify bot commented Jan 18, 2024

Deploy Preview for starknetjs ready!

Name Link
🔨 Latest commit f47d193
🔍 Latest deploy log https://app.netlify.com/sites/starknetjs/deploys/65b7c0ff1c65470008b0f8a5
😎 Deploy Preview https://deploy-preview-927--starknetjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@penovicp penovicp left a comment

Choose a reason for hiding this comment

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

There should be a discussion about the design for this feature. The main issue I see with this approach is that by being applied after the error handler the fallback would also take effect for expected error responses, e.g. a response with HTTP status 200 that contains a Transaction hash not found error, which doesn't feel right to me.

@tabaktoni
Copy link
Collaborator

@piwonskp Will you update for expected error responses?

@piwonskp
Copy link
Contributor Author

@tabaktoni @penovicp Sure, I'll narrow down error handling to fetch errors

Do not use fallback node if rpc error was thrown
@piwonskp
Copy link
Contributor Author

@tabaktoni @penovicp Done, rpc error handling is done outside of the catch clause now

@piwonskp piwonskp mentioned this pull request Feb 6, 2024
6 tasks
@piwonskp piwonskp closed this by deleting the head repository Feb 22, 2024
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.

4 participants