Skip to content

🥅 app: globally suppress expected kyc api errors#784

Merged
cruzdanilo merged 1 commit intomainfrom
github
Feb 16, 2026
Merged

🥅 app: globally suppress expected kyc api errors#784
cruzdanilo merged 1 commit intomainfrom
github

Conversation

@cruzdanilo
Copy link
Member

@cruzdanilo cruzdanilo commented Feb 16, 2026


Open with Devin

Summary by CodeRabbit

  • Bug Fixes
    • Improved KYC error handling by globally suppressing expected API errors, reducing unnecessary error notifications.

@changeset-bot
Copy link

changeset-bot bot commented Feb 16, 2026

🦋 Changeset detected

Latest commit: d65aefa

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link

coderabbitai bot commented Feb 16, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

The PR adds a changeset file declaring a patch release for "@exactly/mobile" and refactors error handling in queryClient.ts by introducing a centralized expected() helper function that classifies API errors, consolidating duplicate error classification logic.

Changes

Cohort / File(s) Summary
Changeset Declaration
.changeset/quiet-owls-rest.md
Declares a patch release for "@exactly/mobile" with the change: "🥅 globally suppress expected kyc api errors".
Query Client Refactoring
src/utils/queryClient.ts
Introduces a centralized expected(error) helper function that classifies APIError instances by text field (no kyc, not started, bad kyc, kyc required). Replaces inline hard-coded error checks in the onError handler and kyc/status query defaults with calls to this helper. Consolidates duplicate error classification logic previously defined later in the file.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch github

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link

Summary of Changes

Hello @cruzdanilo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the application's global error handling mechanism by introducing specific suppressions for anticipated KYC-related API errors. The change aims to prevent these expected errors from being reported, thereby reducing noise in error monitoring systems and ensuring that only unexpected or critical issues are flagged.

Highlights

  • Global KYC Error Suppression: The QueryClient configuration was updated to suppress specific API errors related to Know Your Customer (KYC) status, including "no kyc", "not started", and "bad kyc". Additionally, the "kyc required" error is now suppressed specifically for "card details" queries.
Changelog
  • .changeset/quiet-owls-rest.md
    • Added a new changeset file to document the global suppression of expected KYC API errors.
  • src/utils/queryClient.ts
    • Modified the QueryClient's default onError handler to include new conditions for suppressing specific APIError messages related to KYC status.
    • Refactored existing KYC error suppression logic for "card details" queries to be more precise.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@sentry
Copy link

sentry bot commented Feb 16, 2026

Sentry Issue: EXA-189

gemini-code-assist[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@sentry
Copy link

sentry bot commented Feb 16, 2026

Codecov Report

❌ Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.51%. Comparing base (fc1081d) to head (408175e).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/utils/queryClient.ts 57.14% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #784   +/-   ##
=======================================
  Coverage   69.50%   69.51%           
=======================================
  Files         207      207           
  Lines        7202     7204    +2     
  Branches     2256     2258    +2     
=======================================
+ Hits         5006     5008    +2     
  Misses       2007     2007           
  Partials      189      189           
Flag Coverage Δ
e2e 69.48% <57.14%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cruzdanilo cruzdanilo merged commit d65aefa into main Feb 16, 2026
3 of 5 checks passed
@cruzdanilo cruzdanilo deleted the github branch February 16, 2026 04:05
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.

1 participant

Comments