fix: enhance error messaging and improve resource selection in PAM components

- Updated error message in AWS IAM resource factory to include the PAM role ARN for better debugging.
- Added functionality to clear the search input when a value is selected in the ResourceSelect component, improving user experience.
- Refactored AwsIamAccountForm to fetch PAM resource details based on account or provided resourceId and resourceType, ensuring accurate role ARN usage in trust policy.
This commit is contained in:
Victor Santos
2025-12-08 14:28:05 -03:00
parent d09849d9dc
commit 2e4a1acd03
3 changed files with 27 additions and 14 deletions
@@ -62,8 +62,7 @@ export const awsIamResourceFactory: TPamResourceFactory<TAwsIamResourceConnectio
if (!isValid) {
throw new BadRequestError({
message:
"Unable to assume the target role. Verify the target role ARN and ensure the PAM role has permission to assume it."
message: `Unable to assume the target role. Verify the target role ARN and ensure the PAM role (ARN: ${connectionDetails.roleArn}) has permission to assume it.`
});
}