This is an automated email from the ASF dual-hosted git repository.

luigidemasi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit f4f63bb77a50068cd40b3b8c62675752f00efbd8
Author: Luigi De Masi <[email protected]>
AuthorDate: Thu Oct 1 08:52:32 2026 +0200

    CAMEL-25201: Tighten invalid API path assertions
    
    Require IllegalArgumentException as the endpoint failure's direct cause
    so unrelated exceptions do not satisfy the invalid-path test. Check the
    direct cause because malformed URI inputs retain URISyntaxException as
    the deepest cause.
    
    Co-authored-by: Codex <[email protected]>
    Signed-off-by: Luigi De Masi <[email protected]>
---
 .../org/apache/camel/component/typesafeai/TypeSafeAiApiPathTest.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/components/camel-ai/camel-typesafe-ai/src/test/java/org/apache/camel/component/typesafeai/TypeSafeAiApiPathTest.java
 
b/components/camel-ai/camel-typesafe-ai/src/test/java/org/apache/camel/component/typesafeai/TypeSafeAiApiPathTest.java
index 38248cd7131a..ce01b1ed80f1 100644
--- 
a/components/camel-ai/camel-typesafe-ai/src/test/java/org/apache/camel/component/typesafeai/TypeSafeAiApiPathTest.java
+++ 
b/components/camel-ai/camel-typesafe-ai/src/test/java/org/apache/camel/component/typesafeai/TypeSafeAiApiPathTest.java
@@ -132,7 +132,7 @@ class TypeSafeAiApiPathTest extends TypeSafeAiTestSupport {
     void rejectsInvalidPathsBeforeSending(String apiPath) {
         context.getComponent("typesafe-ai", 
TypeSafeAiComponent.class).getConfiguration().setApiPath(apiPath);
 
-        assertThatThrownBy(() -> 
context.getEndpoint("typesafe-ai:invalid")).isInstanceOf(Exception.class);
+        assertThatThrownBy(() -> 
context.getEndpoint("typesafe-ai:invalid")).hasCauseInstanceOf(IllegalArgumentException.class);
         assertThat(paths).isEmpty();
     }
 }

Reply via email to