You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2025/12/18 12:59:14 UTC

(camel) branch main updated: CAMEL-22737 Exception on unsupported content type (#20493)

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 98fa1c7933d5 CAMEL-22737 Exception on unsupported content type (#20493)
98fa1c7933d5 is described below

commit 98fa1c7933d52241784aabf8063ca5d805629897
Author: Jürgen Link <ju...@scoop-software.de>
AuthorDate: Thu Dec 18 13:59:08 2025 +0100

    CAMEL-22737 Exception on unsupported content type (#20493)
    
    * Throw an AS2DecryptionException when an entity contains an unsupported content type
    
    * throw exception from correct switch case
    
    * Fix indentation
    
    ---------
    
    Co-authored-by: jlink <ju...@gmail.com>
---
 .../java/org/apache/camel/component/as2/api/entity/EntityParser.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/EntityParser.java b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/EntityParser.java
index ce809ab3c80f..d6b4f84efeaa 100644
--- a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/EntityParser.java
+++ b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/EntityParser.java
@@ -888,7 +888,7 @@ public final class EntityParser {
                     }
                     break;
                 default:
-                    break;
+                    throw new AS2DecryptionException("Unsupported entity content type: " + entityContentType);
             }
 
             return entity;