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 2026/08/11 13:02:03 UTC

(camel-spring-boot) branch camel-spring-boot-4.18.x updated: CAMEL-24380: Fix platform-http timeout returning Whitelabel Error Page (#1886)

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

davsclaus pushed a commit to branch camel-spring-boot-4.18.x
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


The following commit(s) were added to refs/heads/camel-spring-boot-4.18.x by this push:
     new c1dc0b7dbc1 CAMEL-24380: Fix platform-http timeout returning Whitelabel Error Page (#1886)
c1dc0b7dbc1 is described below

commit c1dc0b7dbc1d1d07e0ce45d9368a08745d5add8d
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Aug 11 15:01:57 2026 +0200

    CAMEL-24380: Fix platform-http timeout returning Whitelabel Error Page (#1886)
    
    Remove the WebAsyncTask onTimeout callback that called
    response.sendError(503) directly, bypassing Spring MVC's exception
    resolution chain. Without the callback, Spring's default
    AsyncRequestTimeoutException propagates normally, populating the
    jakarta.servlet.error.* request attributes so that Boot's
    BasicErrorController renders the standard JSON error response.
    
    Signed-off-by: Claus Ibsen <cl...@gmail.com>
    Co-authored-by: Claude Opus 4.6 <no...@anthropic.com>
---
 .../platform/http/springboot/SpringBootPlatformHttpConsumer.java    | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpConsumer.java b/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpConsumer.java
index 9d9f5189294..dcf883385b1 100644
--- a/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpConsumer.java
+++ b/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpConsumer.java
@@ -110,12 +110,6 @@ public class SpringBootPlatformHttpConsumer extends DefaultConsumer implements P
             }
             return null;
         });
-        task.onTimeout(() -> {
-            if (!response.isCommitted()) {
-                response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
-            }
-            return null;
-        });
         return task;
     }