improve rotation account error response

This commit is contained in:
x032205
2025-10-20 21:13:40 -04:00
parent bdbec5b158
commit efd63dcb35

View File

@@ -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}`
});
}