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: error handling in Provider for when a node is offline #3116

Merged
merged 2 commits into from
Sep 6, 2024

Conversation

arthurgeron
Copy link
Contributor

@arthurgeron arthurgeron commented Sep 5, 2024

Release notes

In this release, we:

  • Fixed error handling in Provider for when a node is offline

Summary

If a node is offline, the Provider middleware throws an exception when it tries to inject the auth headers into an undefined request object, so we check if the request object is valid before injecting auth headers.

Checklist

  • All changes are covered by tests (or not applicable)
  • All changes are documented (or not applicable)
  • I reviewed the entire PR myself (preferably, on GH UI)
  • I described all Breaking Changes (or there's none)

Copy link

vercel bot commented Sep 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
create-fuels-template ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 5, 2024 7:40pm
ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 5, 2024 7:40pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
create-fuels-counter-example ⬜️ Ignored (Inspect) Sep 5, 2024 7:40pm

helciofranco
helciofranco previously approved these changes Sep 5, 2024
@arthurgeron arthurgeron changed the title fix: exception in provider middleware when endpoint is offline fix: fix middleware exception when making a request to an offline provider Sep 5, 2024
@arthurgeron arthurgeron changed the title fix: fix middleware exception when making a request to an offline provider fix: middleware exception when provider is offline Sep 5, 2024
@arboleya arboleya changed the title fix: middleware exception when provider is offline fix: error handling in Provider for when a node is offline Sep 5, 2024
Copy link
Member

@arboleya arboleya left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @arthurgeron! ❤️

I applied some touchups to the PR description.

arboleya
arboleya previously approved these changes Sep 5, 2024
Torres-ssf
Torres-ssf previously approved these changes Sep 5, 2024
@arboleya arboleya enabled auto-merge (squash) September 5, 2024 19:17
@arboleya arboleya dismissed their stale review September 5, 2024 19:18

Oops, too early. Tests failing.

chore: update changeset
Copy link
Contributor

github-actions bot commented Sep 5, 2024

Coverage Report:

Lines Branches Functions Statements
79.37%(+0%) 72.15%(+0.02%) 77.73%(+0%) 79.43%(+0%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 packages/account/src/providers/provider.ts 71.15%
(+0%)
64.87%
(+0.34%)
74.19%
(+0%)
70.79%
(+0%)

@arboleya arboleya enabled auto-merge (squash) September 5, 2024 20:39
@arboleya arboleya merged commit 2ce9ce5 into master Sep 6, 2024
23 checks passed
@arboleya arboleya deleted the ag/fix/undefined-request-obj branch September 6, 2024 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants