Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix: status code when token auth not found

Piyush Gupta08cb45f9af55
diff --git a/backend/src/services/identity-token-auth/identity-token-auth-service.ts b/backend/src/services/identity-token-auth/identity-token-auth-service.ts
index 2d3e11cd8f..e6969da611 100644
--- a/backend/src/services/identity-token-auth/identity-token-auth-service.ts
+++ b/backend/src/services/identity-token-auth/identity-token-auth-service.ts
@@ -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"
});
}