-
Notifications
You must be signed in to change notification settings - Fork 894
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 throttling for App Check to prevent unnecessary requests to backend #6439
Conversation
🦋 Changeset detectedLatest commit: 0efea24 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
Changeset File Check ✅
|
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1Affected Products
Test Logs |
packages/app-check/src/providers.ts
Outdated
@@ -80,7 +80,10 @@ export class ReCaptchaV3Provider implements AppCheckProvider { | |||
this._heartbeatServiceProvider! | |||
); | |||
} catch (e) { | |||
if ((e as FirebaseError).code === AppCheckError.FETCH_STATUS_ERROR) { | |||
console.log({ coder: (e as FirebaseError).code }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this left over from debugging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! Good catch. Removing it now
'test error msg', | ||
{ httpStatus: 503 } | ||
) | ||
ERROR_FACTORY.create(AppCheckError.FETCH_STATUS_ERROR, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing the test!
…nd (#6439) * Switch check for FirebaseError code to use includes * Add changeset * Update changeset to a patch * Remove debugging console.log
Switch check for FirebaseError code to use includes #6373