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

hotfix: skip faucet refill error #3680

Merged
merged 1 commit into from
Jul 12, 2023
Merged

Conversation

alter-eggo
Copy link
Collaborator

Description

See title

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency changes
  • Code refactor / cleanup
  • Documentation or wording changes
  • Other

How should this be tested?

Please provide instructions so we can test. Please also list any relevant details for your test configuration.

  • Test A
  • Test B

Visual context

Please provide any relevant visual context for UI changes or additions. This could be static screenshots or a loom screencast.

Checklist:

  • I have performed a self-review of my own code
  • I have requested at least 1 review (If the PR is significant enough, use best judgement here)
  • I have commented my code where relevant, particularly in hard-to-understand areas
  • If package-lock.json has changes, it was intentional.
  • The base of this PR is master if hotfix, develop if not

@vercel
Copy link

vercel bot commented Jul 11, 2023

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

Name Status Preview Comments Updated (UTC)
beta-app-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 11, 2023 1:24pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
app-v2 ⬜️ Ignored (Inspect) Jul 11, 2023 1:24pm

Comment on lines +19 to +20
!isUserError(error) &&
!isFaucetRefillError(error)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of adding multiple conditions here we should have a single catchall conditional like shouldCaptureError or similar.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

isn't shouldLogFailure actually that single catchall conditional?

Copy link
Collaborator

Choose a reason for hiding this comment

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

think he means merge isUserError with isFaucetRefillError and call it shouldCaptureError

Copy link
Collaborator Author

@alter-eggo alter-eggo Jul 12, 2023

Choose a reason for hiding this comment

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

if so, I don't understand the logic, why we need one more function here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry, I missed the context of the function these conditionals are in, this shouldLogFailure function is essentially what I'm asking for, but it's in the wrong place. We should have a global shouldCaptureError function in something like useErrors or the utils file Daniel created. We need a single source of truth for error handling.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah, but I did it as hf to prevent failing errors in sentry, and Daniel did that pr in dev. do you think it's better to do this in dev branch?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah fair enough, lets merge this and continue work on global handling.

@alter-eggo alter-eggo merged commit bff7e02 into master Jul 12, 2023
@alter-eggo alter-eggo deleted the hf/skip-faucet-refill-error branch August 7, 2023 05:08
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.

3 participants