Skip to content

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

improve rotation account error response

x032205efd63dcb35b8
diff --git a/backend/src/ee/services/pam-resource/pam-resource-service.ts b/backend/src/ee/services/pam-resource/pam-resource-service.ts
index 683e0bca4b..9ec702b248 100644
--- a/backend/src/ee/services/pam-resource/pam-resource-service.ts
+++ b/backend/src/ee/services/pam-resource/pam-resource-service.ts
@@ -213,12 +213,9 @@ export const pamResourceServiceFactory = ({
kmsService
});
} catch (err) {
- if (
- err instanceof BadRequestError &&
- err.message === "Account credentials invalid: Username or password incorrect"
- ) {
+ if (err instanceof BadRequestError) {
throw new BadRequestError({
- message: "Rotation Account credentials invalid: Username or password incorrect"
+ message: `Rotation Account Error: ${err.message}`
});
}