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

Process 403 error from address/token/contract handle #2477

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

isstuev
Copy link
Collaborator

@isstuev isstuev commented Dec 17, 2024

Description and Related Issue(s)

resolves #2473

Checklist for PR author

  • I have tested these changes locally.
  • I added tests to cover any new functionality, following this guide
  • Whenever I fix a bug, I include a regression test to ensure that the bug does not reappear silently.
  • If I have added, changed, renamed, or removed an environment variable
    • I updated the list of environment variables in the documentation
    • I made the necessary changes to the validator script according to the guide
    • I added "ENVs" label to this pull request

@isstuev isstuev requested a review from tom2drum December 19, 2024 14:33
@isstuev isstuev marked this pull request as ready for review December 19, 2024 14:33
Comment on lines +40 to +43
if (error.status < 500) {
return false;
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we handle this case in the main retry function.

if (status && status >= 400 && status < 500) {

@@ -92,7 +98,7 @@ export default function useAddressQuery({ hash, isEnabled = true }: Params): Add
};
},
placeholderData: [ GET_BALANCE ],
enabled: apiQuery.isError || apiQuery.errorUpdateCount > 0,
enabled: (apiQuery.isError || apiQuery.errorUpdateCount > 0) && !NO_RPC_FALLBACK_ERROR_CODES.includes(apiQuery.error?.status ?? 999),
Copy link
Collaborator

Choose a reason for hiding this comment

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

What does 999 stand for? Shouldn't we check if apiQuery.error?.status exists before searching for it in the NO_RPC_FALLBACK_ERROR_CODES array?

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.

Process 403 error from address/token/contract handle
2 participants