improve rotation account error response

This commit is contained in:
x032205
2025-10-20 21:13:40 -04:00
parent bdbec5b158
commit efd63dcb35
@@ -213,12 +213,9 @@ export const pamResourceServiceFactory = ({
kmsService kmsService
}); });
} catch (err) { } catch (err) {
if ( if (err instanceof BadRequestError) {
err instanceof BadRequestError &&
err.message === "Account credentials invalid: Username or password incorrect"
) {
throw new BadRequestError({ throw new BadRequestError({
message: "Rotation Account credentials invalid: Username or password incorrect" message: `Rotation Account Error: ${err.message}`
}); });
} }