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

Catch errors in debug token exchange logic #8792

Merged
merged 2 commits into from
Feb 19, 2025
Merged

Catch errors in debug token exchange logic #8792

merged 2 commits into from
Feb 19, 2025

Conversation

hsubox76
Copy link
Contributor

The internal getToken() method should never throw - it's used by other product SDKs (auth, etc.) and it's up to those product SDKs to handle errors, which are attached to the token as a string property. We have a try/catch around the exchange logic for the normal token, which returns a dummy token and the error string when an error is caught, but we didn't have this same try/catch around the logic where we try to exchange the debug token. Added it.

@hsubox76 hsubox76 requested review from a team as code owners February 14, 2025 00:11
Copy link

changeset-bot bot commented Feb 14, 2025

🦋 Changeset detected

Latest commit: 1317836

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

This PR includes changesets to release 3 packages
Name Type
@firebase/app-check Patch
@firebase/app-check-compat Patch
firebase Patch

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Feb 14, 2025

Size Report 1

Affected Products

  • @firebase/app-check

    TypeBase (b92592d)Merge (43ad63d)Diff
    browser26.3 kB26.4 kB+128 B (+0.5%)
    main27.3 kB27.4 kB+128 B (+0.5%)
    module26.3 kB26.4 kB+128 B (+0.5%)
  • bundle

    TypeBase (b92592d)Merge (43ad63d)Diff
    app-check (CustomProvider)37.4 kB37.5 kB+102 B (+0.3%)
    app-check (ReCaptchaEnterpriseProvider)39.9 kB40.0 kB+102 B (+0.3%)
    app-check (ReCaptchaV3Provider)39.9 kB40.0 kB+102 B (+0.3%)
  • firebase

    TypeBase (b92592d)Merge (43ad63d)Diff
    firebase-app-check-compat.js22.6 kB22.7 kB+89 B (+0.4%)
    firebase-app-check.js24.9 kB25.0 kB+101 B (+0.4%)
    firebase-compat.js792 kB792 kB+92 B (+0.0%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/qXV6gd4paU.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Feb 14, 2025

Size Analysis Report 1

Affected Products

  • @firebase/app-check

    • initializeAppCheck

      Size

      TypeBase (b92592d)Merge (43ad63d)Diff
      size11.2 kB11.3 kB+100 B (+0.9%)
      size-with-ext-deps36.4 kB36.5 kB+102 B (+0.3%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/OVURvO2frJ.html

@hsubox76 hsubox76 requested a review from dlarocque February 14, 2025 20:53
@hsubox76 hsubox76 merged commit f681482 into main Feb 19, 2025
37 of 38 checks passed
@hsubox76 hsubox76 deleted the ch-ac-debug-fix-2 branch February 19, 2025 16:33
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