Merge pull request #4816 from Infisical/fix/identity-token-error-status

fix: status code when token auth is not found
This commit is contained in:
Piyush Gupta
2025-11-06 01:54:05 +05:30
committed by GitHub

View File

@@ -244,8 +244,8 @@ export const identityTokenAuthServiceFactory = ({
}
if (!identityMembershipOrg.identity.authMethods.includes(IdentityAuthMethod.TOKEN_AUTH)) {
throw new BadRequestError({
message: "The identity does not have Token Auth attached"
throw new NotFoundError({
message: "Token Auth configuration not found for identity"
});
}