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

Move template data under a new customData field #3946

Merged
merged 10 commits into from
Oct 19, 2020
Merged

Conversation

Feiyang1
Copy link
Member

Write template data to a new customData field in FirebaseError instead of writing to the error object itself to avoid overwriting existing fields.

Solves #1891 (comment)

@changeset-bot
Copy link

changeset-bot bot commented Oct 14, 2020

🦋 Changeset detected

Latest commit: 65399ac

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

This PR includes changesets to release 28 packages
Name Type
@firebase/util Patch
@firebase/analytics Patch
@firebase/app Patch
@firebase/component Patch
@firebase/database Patch
firebase Patch
@firebase/firestore Patch
@firebase/installations Patch
@firebase/messaging Patch
@firebase/performance Patch
@firebase/remote-config Patch
@firebase/rules-unit-testing Patch
@firebase/storage Patch
@firebase/functions 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 Oct 14, 2020

Binary Size Report

Affected SDKs

  • @firebase/analytics

    Type Base (f355439) Head (d1eceee) Diff
    esm2017 18.6 kB 18.6 kB +37 B (+0.2%)
    main 23.8 kB 23.8 kB +37 B (+0.2%)
    module 23.3 kB 23.3 kB +37 B (+0.2%)
  • @firebase/firestore

    Type Base (f355439) Head (d1eceee) Diff
    browser 250 kB 249 kB -668 B (-0.3%)
    esm2017 198 kB 198 kB -646 B (-0.3%)
    main 485 kB 484 kB -1.04 kB (-0.2%)
    module 247 kB 247 kB -668 B (-0.3%)
    react-native 198 kB 198 kB -646 B (-0.3%)
  • @firebase/firestore/exp

    Type Base (f355439) Head (d1eceee) Diff
    browser 190 kB 190 kB -85 B (-0.0%)
    main 478 kB 478 kB -178 B (-0.0%)
    module 190 kB 190 kB -85 B (-0.0%)
    react-native 190 kB 190 kB -85 B (-0.0%)
  • @firebase/firestore/lite

    Type Base (f355439) Head (d1eceee) Diff
    browser 63.6 kB 63.5 kB -79 B (-0.1%)
    main 140 kB 140 kB -168 B (-0.1%)
    module 63.6 kB 63.5 kB -79 B (-0.1%)
    react-native 63.8 kB 63.7 kB -79 B (-0.1%)
  • @firebase/firestore/memory

    Type Base (f355439) Head (d1eceee) Diff
    browser 187 kB 186 kB -668 B (-0.4%)
    esm2017 148 kB 148 kB -646 B (-0.4%)
    main 357 kB 356 kB -1.04 kB (-0.3%)
    module 185 kB 184 kB -668 B (-0.4%)
    react-native 148 kB 148 kB -646 B (-0.4%)
  • @firebase/installations

    Type Base (f355439) Head (d1eceee) Diff
    esm2017 16.6 kB 16.6 kB +33 B (+0.2%)
    main 22.1 kB 22.1 kB +33 B (+0.1%)
    module 21.5 kB 21.6 kB +33 B (+0.2%)
  • @firebase/remote-config

    Type Base (f355439) Head (d1eceee) Diff
    browser 22.8 kB 22.8 kB +26 B (+0.1%)
    esm2017 17.4 kB 17.4 kB +26 B (+0.1%)
    main 22.8 kB 22.8 kB +26 B (+0.1%)
    module 22.4 kB 22.4 kB +26 B (+0.1%)
  • @firebase/util

    Type Base (f355439) Head (d1eceee) Diff
    browser 21.1 kB 21.0 kB -187 B (-0.9%)
    esm2017 18.8 kB 18.6 kB -155 B (-0.8%)
    main 21.2 kB 21.0 kB -187 B (-0.9%)
    module 20.1 kB 19.9 kB -187 B (-0.9%)
  • firebase

    Click to show 14 binary size changes.
    Type Base (f355439) Head (d1eceee) Diff
    firebase-analytics.js 35.8 kB 35.7 kB -99 B (-0.3%)
    firebase-app.js 20.1 kB 20.0 kB -168 B (-0.8%)
    firebase-database.js 190 kB 189 kB -168 B (-0.1%)
    firebase-firestore.js 287 kB 286 kB -838 B (-0.3%)
    firebase-firestore.memory.js 226 kB 225 kB -838 B (-0.4%)
    firebase-functions.js 10.2 kB 9.99 kB -168 B (-1.7%)
    firebase-installations.js 19.1 kB 19.0 kB -135 B (-0.7%)
    firebase-messaging.js 40.9 kB 40.7 kB -135 B (-0.3%)
    firebase-performance-standalone.es2017.js 71.8 kB 71.7 kB -109 B (-0.2%)
    firebase-performance-standalone.js 48.2 kB 48.1 kB -135 B (-0.3%)
    firebase-performance.js 38.6 kB 38.5 kB -135 B (-0.3%)
    firebase-remote-config.js 36.9 kB 36.8 kB -110 B (-0.3%)
    firebase-storage.js 39.7 kB 39.6 kB -168 B (-0.4%)
    firebase.js 831 kB 830 kB -744 B (-0.1%)

Test Logs

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Oct 14, 2020

Size Analysis Report

Affected Products

@firebase/app-exp

  • getApp

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size_with_ext_deps 5.40 kB 5.26 kB -144 B (-2.7%)
  • initializeApp

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size_with_ext_deps 9.08 kB 8.93 kB -144 B (-1.6%)
  • onLog

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size_with_ext_deps 5.96 kB 5.82 kB -144 B (-2.4%)

@firebase/auth-exp

  • ActionCodeURL

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 45.4 kB 45.4 kB +11 B (+0.0%)
    size_with_ext_deps 56.1 kB 56.0 kB -133 B (-0.2%)
  • AuthCredential

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 44.7 kB 44.7 kB +11 B (+0.0%)
    size_with_ext_deps 55.4 kB 55.2 kB -133 B (-0.2%)
  • EmailAuthCredential

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 46.5 kB 46.5 kB +11 B (+0.0%)
    size_with_ext_deps 57.1 kB 57.0 kB -133 B (-0.2%)
  • EmailAuthProvider

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 47.8 kB 47.8 kB +11 B (+0.0%)
    size_with_ext_deps 58.5 kB 58.4 kB -133 B (-0.2%)
  • FacebookAuthProvider

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 47.8 kB 47.9 kB +26 B (+0.1%)
    size_with_ext_deps 58.5 kB 58.4 kB -118 B (-0.2%)
  • GithubAuthProvider

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 47.8 kB 47.9 kB +26 B (+0.1%)
    size_with_ext_deps 58.5 kB 58.4 kB -118 B (-0.2%)
  • GoogleAuthProvider

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 47.8 kB 47.9 kB +26 B (+0.1%)
    size_with_ext_deps 58.5 kB 58.4 kB -118 B (-0.2%)
  • OAuthCredential

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 46.5 kB 46.5 kB +11 B (+0.0%)
    size_with_ext_deps 57.2 kB 57.0 kB -133 B (-0.2%)
  • OAuthProvider

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 47.2 kB 47.2 kB +11 B (+0.0%)
    size_with_ext_deps 57.9 kB 57.7 kB -133 B (-0.2%)
  • PhoneAuthCredential

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 46.4 kB 46.5 kB +11 B (+0.0%)
    size_with_ext_deps 57.1 kB 57.0 kB -133 B (-0.2%)
  • PhoneAuthProvider

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 48.2 kB 48.2 kB +11 B (+0.0%)
    size_with_ext_deps 58.8 kB 58.7 kB -133 B (-0.2%)
  • PhoneMultiFactorGenerator

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 45.4 kB 45.4 kB +11 B (+0.0%)
    size_with_ext_deps 56.0 kB 55.9 kB -133 B (-0.2%)
  • RecaptchaVerifier

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 50.9 kB 50.9 kB +11 B (+0.0%)
    size_with_ext_deps 61.6 kB 61.5 kB -133 B (-0.2%)
  • TwitterAuthProvider

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 47.8 kB 47.9 kB +26 B (+0.1%)
    size_with_ext_deps 58.5 kB 58.4 kB -118 B (-0.2%)
  • applyActionCode

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 44.6 kB 44.6 kB +11 B (+0.0%)
    size_with_ext_deps 55.2 kB 55.1 kB -133 B (-0.2%)
  • browserLocalPersistence

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 47.4 kB 47.4 kB +11 B (+0.0%)
    size_with_ext_deps 58.1 kB 58.0 kB -133 B (-0.2%)
  • browserPopupRedirectResolver

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 56.4 kB 56.4 kB +11 B (+0.0%)
    size_with_ext_deps 67.1 kB 67.0 kB -133 B (-0.2%)
  • browserSessionPersistence

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 45.1 kB 45.1 kB +11 B (+0.0%)
    size_with_ext_deps 55.8 kB 55.6 kB -133 B (-0.2%)
  • checkActionCode

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 45.6 kB 45.6 kB +11 B (+0.0%)
    size_with_ext_deps 56.2 kB 56.1 kB -133 B (-0.2%)
  • confirmPasswordReset

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 44.6 kB 44.6 kB +11 B (+0.0%)
    size_with_ext_deps 55.2 kB 55.1 kB -133 B (-0.2%)
  • createUserWithEmailAndPassword

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 45.5 kB 45.5 kB +11 B (+0.0%)
    size_with_ext_deps 56.1 kB 56.0 kB -133 B (-0.2%)
  • deleteUser

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 44.5 kB 44.5 kB +11 B (+0.0%)
    size_with_ext_deps 55.1 kB 55.0 kB -133 B (-0.2%)
  • fetchSignInMethodsForEmail

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 44.8 kB 44.8 kB +11 B (+0.0%)
    size_with_ext_deps 55.4 kB 55.3 kB -133 B (-0.2%)
  • getAdditionalUserInfo

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 45.7 kB 45.7 kB +11 B (+0.0%)
    size_with_ext_deps 56.4 kB 56.2 kB -133 B (-0.2%)
  • getAuth

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 62.2 kB 62.2 kB +11 B (+0.0%)
    size_with_ext_deps 73.7 kB 73.5 kB -133 B (-0.2%)
  • getIdToken

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 44.5 kB 44.5 kB +11 B (+0.0%)
    size_with_ext_deps 55.1 kB 55.0 kB -133 B (-0.2%)
  • getIdTokenResult

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 44.5 kB 44.5 kB +11 B (+0.0%)
    size_with_ext_deps 55.1 kB 55.0 kB -133 B (-0.2%)
  • getMultiFactorResolver

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 47.3 kB 47.4 kB +11 B (+0.0%)
    size_with_ext_deps 58.0 kB 57.9 kB -133 B (-0.2%)
  • getRedirectResult

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 49.9 kB 50.0 kB +63 B (+0.1%)
    size_with_ext_deps 60.6 kB 60.5 kB -81 B (-0.1%)
  • inMemoryPersistence

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 44.5 kB 44.5 kB +11 B (+0.0%)
    size_with_ext_deps 55.1 kB 55.0 kB -133 B (-0.2%)
  • indexedDBLocalPersistence

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 47.5 kB 47.5 kB +11 B (+0.0%)
    size_with_ext_deps 58.2 kB 58.1 kB -133 B (-0.2%)
  • initializeAuth

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 44.8 kB 44.8 kB +11 B (+0.0%)
    size_with_ext_deps 56.1 kB 55.9 kB -133 B (-0.2%)
  • isSignInWithEmailLink

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 45.5 kB 45.6 kB +11 B (+0.0%)
    size_with_ext_deps 56.2 kB 56.1 kB -133 B (-0.2%)
  • linkWithCredential

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 45.5 kB 45.5 kB +11 B (+0.0%)
    size_with_ext_deps 56.2 kB 56.0 kB -133 B (-0.2%)
  • linkWithPhoneNumber

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 49.0 kB 49.0 kB +11 B (+0.0%)
    size_with_ext_deps 59.7 kB 59.6 kB -133 B (-0.2%)
  • linkWithPopup

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 53.0 kB 53.0 kB +63 B (+0.1%)
    size_with_ext_deps 63.6 kB 63.6 kB -81 B (-0.1%)
  • linkWithRedirect

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 48.0 kB 48.0 kB +11 B (+0.0%)
    size_with_ext_deps 58.7 kB 58.6 kB -133 B (-0.2%)
  • multiFactor

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 46.5 kB 46.6 kB +11 B (+0.0%)
    size_with_ext_deps 57.2 kB 57.1 kB -133 B (-0.2%)
  • onAuthStateChanged

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 44.5 kB 44.5 kB +11 B (+0.0%)
    size_with_ext_deps 55.2 kB 55.0 kB -133 B (-0.2%)
  • onIdTokenChanged

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 44.5 kB 44.5 kB +11 B (+0.0%)
    size_with_ext_deps 55.2 kB 55.0 kB -133 B (-0.2%)
  • parseActionCodeURL

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 45.5 kB 45.5 kB +11 B (+0.0%)
    size_with_ext_deps 56.1 kB 56.0 kB -133 B (-0.2%)
  • reauthenticateWithCredential

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 46.1 kB 46.2 kB +63 B (+0.1%)
    size_with_ext_deps 56.8 kB 56.7 kB -81 B (-0.1%)
  • reauthenticateWithPhoneNumber

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 49.6 kB 49.7 kB +63 B (+0.1%)
    size_with_ext_deps 60.3 kB 60.2 kB -81 B (-0.1%)
  • reauthenticateWithPopup

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 53.0 kB 53.0 kB +63 B (+0.1%)
    size_with_ext_deps 63.7 kB 63.6 kB -81 B (-0.1%)
  • reauthenticateWithRedirect

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 47.8 kB 47.8 kB +11 B (+0.0%)
    size_with_ext_deps 58.4 kB 58.3 kB -133 B (-0.2%)
  • reload

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 44.4 kB 44.5 kB +11 B (+0.0%)
    size_with_ext_deps 55.1 kB 55.0 kB -133 B (-0.2%)
  • sendEmailVerification

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 45.1 kB 45.1 kB +11 B (+0.0%)
    size_with_ext_deps 55.7 kB 55.6 kB -133 B (-0.2%)
  • sendPasswordResetEmail

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 45.0 kB 45.0 kB +11 B (+0.0%)
    size_with_ext_deps 55.6 kB 55.5 kB -133 B (-0.2%)
  • sendSignInLinkToEmail

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 45.0 kB 45.0 kB +11 B (+0.0%)
    size_with_ext_deps 55.6 kB 55.5 kB -133 B (-0.2%)
  • setPersistence

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 44.5 kB 44.5 kB +11 B (+0.0%)
    size_with_ext_deps 55.1 kB 55.0 kB -133 B (-0.2%)
  • signInAnonymously

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 45.6 kB 45.6 kB +11 B (+0.0%)
    size_with_ext_deps 56.3 kB 56.1 kB -133 B (-0.2%)
  • signInWithCredential

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 45.8 kB 45.9 kB +63 B (+0.1%)
    size_with_ext_deps 56.5 kB 56.4 kB -81 B (-0.1%)
  • signInWithCustomToken

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 45.5 kB 45.5 kB +11 B (+0.0%)
    size_with_ext_deps 56.1 kB 56.0 kB -133 B (-0.2%)
  • signInWithEmailAndPassword

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 49.3 kB 49.3 kB +63 B (+0.1%)
    size_with_ext_deps 59.9 kB 59.8 kB -81 B (-0.1%)
  • signInWithEmailLink

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 49.5 kB 49.5 kB +63 B (+0.1%)
    size_with_ext_deps 60.1 kB 60.0 kB -81 B (-0.1%)
  • signInWithPhoneNumber

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 49.3 kB 49.4 kB +63 B (+0.1%)
    size_with_ext_deps 60.0 kB 59.9 kB -81 B (-0.1%)
  • signInWithPopup

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 53.0 kB 53.0 kB +63 B (+0.1%)
    size_with_ext_deps 63.6 kB 63.6 kB -81 B (-0.1%)
  • signInWithRedirect

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 47.5 kB 47.5 kB +11 B (+0.0%)
    size_with_ext_deps 58.2 kB 58.0 kB -133 B (-0.2%)
  • signOut

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 44.5 kB 44.5 kB +11 B (+0.0%)
    size_with_ext_deps 55.1 kB 55.0 kB -133 B (-0.2%)
  • unlink

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 45.1 kB 45.1 kB +11 B (+0.0%)
    size_with_ext_deps 55.7 kB 55.6 kB -133 B (-0.2%)
  • updateCurrentUser

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 44.5 kB 44.5 kB +11 B (+0.0%)
    size_with_ext_deps 55.2 kB 55.0 kB -133 B (-0.2%)
  • updateEmail

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 44.8 kB 44.8 kB +11 B (+0.0%)
    size_with_ext_deps 55.4 kB 55.3 kB -133 B (-0.2%)
  • updatePassword

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 44.8 kB 44.8 kB +11 B (+0.0%)
    size_with_ext_deps 55.4 kB 55.3 kB -133 B (-0.2%)
  • updatePhoneNumber

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 45.2 kB 45.2 kB +11 B (+0.0%)
    size_with_ext_deps 55.9 kB 55.7 kB -133 B (-0.2%)
  • updateProfile

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 44.9 kB 44.9 kB +11 B (+0.0%)
    size_with_ext_deps 55.6 kB 55.5 kB -133 B (-0.2%)
  • useDeviceLanguage

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 44.5 kB 44.5 kB +11 B (+0.0%)
    size_with_ext_deps 55.1 kB 55.0 kB -133 B (-0.2%)
  • verifyBeforeUpdateEmail

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 45.1 kB 45.1 kB +11 B (+0.0%)
    size_with_ext_deps 55.7 kB 55.6 kB -133 B (-0.2%)
  • verifyPasswordResetCode

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 45.6 kB 45.7 kB +11 B (+0.0%)
    size_with_ext_deps 56.3 kB 56.2 kB -133 B (-0.2%)

@firebase/functions-exp

  • httpsCallable

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size_with_ext_deps 9.96 kB 9.81 kB -144 B (-1.4%)

@firebase/installations-exp

  • deleteInstallations

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 8.92 kB 8.95 kB +33 B (+0.4%)
    size_with_ext_deps 17.4 kB 17.3 kB -111 B (-0.6%)
  • getId

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 8.36 kB 8.39 kB +33 B (+0.4%)
    size_with_ext_deps 16.8 kB 16.7 kB -111 B (-0.7%)
  • getInstallations

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 8.44 kB 8.48 kB +33 B (+0.4%)
    size_with_ext_deps 16.9 kB 16.8 kB -111 B (-0.7%)
  • getToken

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 8.36 kB 8.40 kB +33 B (+0.4%)
    size_with_ext_deps 16.8 kB 16.7 kB -111 B (-0.7%)
  • onIdChange

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size 8.62 kB 8.65 kB +33 B (+0.4%)
    size_with_ext_deps 17.1 kB 17.0 kB -111 B (-0.7%)

@firebase/performance-exp

  • getPerformance

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size_with_ext_deps 34.3 kB 34.2 kB -111 B (-0.3%)
  • trace

    Size

    Type Base (f355439) Head (d1eceee) Diff
    size_with_ext_deps 34.2 kB 34.1 kB -111 B (-0.3%)

Test Logs

@github-actions
Copy link
Contributor

github-actions bot commented Oct 15, 2020

Changeset File Check ⚠️

Warning: This PR modifies files in the following packages but they have not been included in the changeset file:

  • @firebase/auth-exp
  • @firebase/installations-exp
  • @firebase/analytics
  • @firebase/installations
  • @firebase/remote-config

Make sure this was intentional.

Copy link
Contributor

@sam-gc sam-gc left a comment

Choose a reason for hiding this comment

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

Looks good for auth

@Feiyang1 Feiyang1 mentioned this pull request Oct 16, 2020
@@ -59,7 +59,7 @@ describe('src/core/providers/facebook', () => {
const error = AUTH_ERROR_FACTORY.create(AuthErrorCode.NEED_CONFIRMATION, {
appName: 'foo'
});
(error as TaggedWithTokenResponse)._tokenResponse = {
(error.customData! as TaggedWithTokenResponse)._tokenResponse = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Always having to use the ! seems weird. In storage, all errors are FirebaseStorageError which extends FirebaseError and makes customData non-optional. But I see auth-exp uses the shared ErrorFactory so I don't know if it would be really messy to get it to return an extended error type instead of FirebaseError.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also should a property of customData be underscore-prefixed? Not sure what that would mean.

Copy link
Member Author

Choose a reason for hiding this comment

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

Valid point. What other SDKs have done is do a is[Product]Error() check, which narrows the type to the specific error type, then you can access customData safely. See here as an example.

That said, I'm not too worried about them since they are all in test files.

I think the underscore means it's for internal usage only, which is fine. @samhorlbeck

@Feiyang1 Feiyang1 merged commit 7d916d9 into master Oct 19, 2020
@Feiyang1 Feiyang1 deleted the fei-error-refactor branch October 19, 2020 16:26
@google-oss-bot google-oss-bot mentioned this pull request Oct 22, 2020
@firebase firebase locked and limited conversation to collaborators Nov 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants