davsclaus commented on code in PR #28353:
URL: https://github.com/apache/camel/pull/28353#discussion_r4364455165


##########
components/camel-aws/camel-aws2-transcribe/src/main/java/org/apache/camel/component/aws2/transcribe/Transcribe2Component.java:
##########
@@ -65,10 +65,14 @@ protected Endpoint createEndpoint(String uri, String 
remaining, Map<String, Obje
         if (ObjectHelper.isEmpty(endpoint.getConfiguration().getRegion())) {
             setRegionOnEndpoint(endpoint);
         }
-        if 
(ObjectHelper.isEmpty(endpoint.getConfiguration().getTranscribeClient())
+        if (!endpoint.getConfiguration().isUseDefaultCredentialsProvider()
+                && 
!endpoint.getConfiguration().isUseProfileCredentialsProvider()
+                && !endpoint.getConfiguration().isUseSessionCredentials()
+                && 
ObjectHelper.isEmpty(endpoint.getConfiguration().getTranscribeClient())
                 && 
(ObjectHelper.isEmpty(endpoint.getConfiguration().getAccessKey())
                         || 
ObjectHelper.isEmpty(endpoint.getConfiguration().getSecretKey()))) {
-            throw new IllegalArgumentException("Amazon transcribe client or 
accessKey and secretKey must be specified");
+            throw new IllegalArgumentException(
+                    "useDefaultCredentialsProvider is set to false, 
useProfileCredentialsProvider is set to false, useSessionCredentials is set to 
false, Amazon transcribe client or accessKey and secretKey must be specified");

Review Comment:
   I kept this message as it is: 33 other AWS components use the same wording 
for the same check, and the Transcribe one now matches them. If we shorten it, 
it should be for all of them in one change.
   
   _Claude Code on behalf of davsclaus_



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to