Skip to content

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

Add error messages for MI expired client secret, num uses limit reached

Tuan Dang3c449214d1f4
diff --git a/backend/src/ee/controllers/v3/machineIdentityController.ts b/backend/src/ee/controllers/v3/machineIdentityController.ts
index 4893383629..4057a84b23 100644
--- a/backend/src/ee/controllers/v3/machineIdentityController.ts
+++ b/backend/src/ee/controllers/v3/machineIdentityController.ts
@@ -333,7 +333,9 @@ export const loginMI = async (req: Request, res: Response) => {
}
);
- throw UnauthorizedRequestError();
+ throw UnauthorizedRequestError({
+ message: "Failed to authenticate MI credentials due to expired client secret"
+ });
}
}
@@ -350,7 +352,9 @@ export const loginMI = async (req: Request, res: Response) => {
}
);
- throw UnauthorizedRequestError();
+ throw UnauthorizedRequestError({
+ message: "Failed to authenticate MI credentials due to client secret number of uses limit reached"
+ });
}
// increment usage count by 1