You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Export error codes as an object map from Auth to make error code check easier. Addresses #4551
To enable use case like the following:
// ErrorCodes is a map of all possible Auth error codesimport{signInAnonymously,ErrorCodes}from'firebase/auth';asyncfunctionsignIn(){try{constcredential=signInAnonymously(auth);}catch(e){// instead of e.code === 'auth/network-request-failed'if(e.code===ErrorCodes.NetworkRequestFailed){// do stuff}}}
Object maps are tree shakable, so they incur no size cost if they are not imported.
We may want to do the same in other SDKs as well.
The text was updated successfully, but these errors were encountered:
Export error codes as an object map from Auth to make error code check easier. Addresses #4551
To enable use case like the following:
Object maps are tree shakable, so they incur no size cost if they are not imported.
We may want to do the same in other SDKs as well.
The text was updated successfully, but these errors were encountered: