You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andrea Cosentino (Jira)" <ji...@apache.org> on 2026/08/27 04:42:00 UTC

[jira] [Created] (CAMEL-24518) camel-ibm-watson-language: analyze with all features disabled yields an opaque Watson 400

Andrea Cosentino created CAMEL-24518:
----------------------------------------

             Summary: 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
             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)