Skip to content

Commit f2099a3

Browse files
committed
PR feedback
1 parent 6573869 commit f2099a3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/auth/src/core/errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ export interface ErrorMapRetriever extends AuthErrorMap {
359359
(): ErrorMap<AuthErrorCode>;
360360
}
361361

362-
export function _prodErrorMap(): ErrorMap<AuthErrorCode> {
362+
function _prodErrorMap(): ErrorMap<AuthErrorCode> {
363363
// We will include this one message in the prod error map since by the very
364364
// nature of this error, developers will never be able to see the message
365365
// using the debugErrorMap (which is installed during auth initialization).

packages/auth/src/core/util/assert.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ import {
2222
_DEFAULT_AUTH_ERROR_FACTORY,
2323
AuthErrorCode,
2424
AuthErrorParams,
25-
_prodErrorMap
25+
prodErrorMap,
26+
ErrorMapRetriever
2627
} from '../errors';
2728
import { _logError } from './log';
2829

@@ -83,7 +84,7 @@ export function _createError<K extends AuthErrorCode>(
8384
}
8485

8586
export function _errorWithCustomMessage(auth: Auth, code: AuthErrorCode, message: string): FirebaseError {
86-
const errorMap = {..._prodErrorMap(), [code]: message};
87+
const errorMap = {...(prodErrorMap as ErrorMapRetriever)(), [code]: message};
8788
const factory = new ErrorFactory<AuthErrorCode, AuthErrorParams>(
8889
'auth',
8990
'Firebase',

0 commit comments

Comments
 (0)