Guillaume Nodet created CAMEL-27597:
---------------------------------------

             Summary: camel-jbang - AI endpoint detection should distinguish 
401/403 (key rejected) from unreachable
                 Key: CAMEL-27597
                 URL: https://issues.apache.org/jira/browse/CAMEL-27597
             Project: Camel
          Issue Type: Improvement
            Reporter: Guillaume Nodet
             Fix For: 4.24.0


When {{camel-jbang}} probes {{/v1/models}} and the server returns 401 or 403, 
the current code treats the endpoint as unreachable, even though the response 
means the server is reachable but rejected the credentials.

The desired behaviour is to distinguish:
* 2xx — endpoint reachable, key accepted
* 401/403 — endpoint reachable, key missing or rejected (report accordingly, 
not \"unreachable\")
* network error / 404 / 5xx — endpoint not reachable

This was raised as bullet 3 of the original CAMEL-27514 report but was deferred 
from the fix PR (#30725) to keep scope focused on the two main bugs (double-/v1 
prefix and missing API key on the probe).

Fixing this would give users a clearer error message when they misconfigure the 
API key, instead of the misleading \"endpoint not reachable\" message.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to