Skip to content

Commit 9b8ef59

Browse files
authored
Recognize and return TENANT_ID_MISMATCH error code (#2389)
Error was already present, but wasn't wired in.
1 parent 4313496 commit 9b8ef59

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

packages/auth/src/rpchandler.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2511,6 +2511,8 @@ fireauth.RpcHandler.getDeveloperError_ =
25112511
fireauth.authenum.Error.UNSUPPORTED_TENANT_OPERATION;
25122512
errorMap[fireauth.RpcHandler.ServerError.INVALID_TENANT_ID] =
25132513
fireauth.authenum.Error.INVALID_TENANT_ID;
2514+
errorMap[fireauth.RpcHandler.ServerError.TENANT_ID_MISMATCH] =
2515+
fireauth.authenum.Error.TENANT_ID_MISMATCH;
25142516

25152517
// User actions (sign-up or deletion) disabled errors.
25162518
errorMap[fireauth.RpcHandler.ServerError.ADMIN_ONLY_OPERATION] =

packages/auth/test/rpchandler_test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2436,6 +2436,8 @@ function testVerifyCustomToken_serverCaughtError() {
24362436
fireauth.authenum.Error.CREDENTIAL_MISMATCH;
24372437
errorMap[fireauth.RpcHandler.ServerError.INVALID_TENANT_ID] =
24382438
fireauth.authenum.Error.INVALID_TENANT_ID;
2439+
errorMap[fireauth.RpcHandler.ServerError.TENANT_ID_MISMATCH] =
2440+
fireauth.authenum.Error.TENANT_ID_MISMATCH;
24392441

24402442
assertServerErrorsAreHandled(function() {
24412443
return rpcHandler.verifyCustomToken(token);

0 commit comments

Comments
 (0)