[ 
https://issues.apache.org/jira/browse/CAMEL-24518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on CAMEL-24518 started by Andrea Cosentino.
------------------------------------------------
> camel-ibm-watson-language: analyze with all features disabled yields an 
> opaque Watson 400
> -----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-24518
>                 URL: https://issues.apache.org/jira/browse/CAMEL-24518
>             Project: Camel
>          Issue Type: Bug
>            Reporter: Andrea Cosentino
>            Assignee: Andrea Cosentino
>            Priority: Major
>             Fix For: 4.23.0
>
>
> WatsonLanguageProducer.buildFeatures() builds a Features object from six 
> boolean analysis flags (sentiment, emotion, entities, keywords, concepts, 
> categories), each resolved from a header or the configuration. If all six are 
> disabled, an empty Features is built and passed to the Natural Language 
> Understanding analyze call, which the Watson service rejects with an HTTP 400 
> (at least one feature is required). The common path is protected by three 
> default-true flags, but a user who explicitly disables them hits an opaque 
> 400 instead of a clear error.
> Fix: validate that at least one analysis feature is enabled before calling 
> the service, and throw a clear IllegalArgumentException otherwise.
> Affected: components/camel-ibm/camel-ibm-watson-language 
> (org.apache.camel.component.ibm.watson.language.WatsonLanguageProducer.buildFeatures).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to