This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-spring-boot-4.14.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.14.x by
this push:
new 6c1041faa32 CAMEL-22936 actuator: do not write error.message if null
(#1642)
6c1041faa32 is described below
commit 6c1041faa32c496e837fa86a3a7450a7a32a15f7
Author: Michael Kroll <[email protected]>
AuthorDate: Fri Jan 30 16:53:05 2026 +0100
CAMEL-22936 actuator: do not write error.message if null (#1642)
detail key and value are not allowed to be null, but
`Throwable#getMessage()` may return `null`
---
.../apache/camel/spring/boot/actuate/health/CamelHealthHelper.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthHelper.java
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthHelper.java
index ac64499765c..9f04a67428a 100644
---
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthHelper.java
+++
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthHelper.java
@@ -60,7 +60,9 @@ final class CamelHealthHelper {
});
result.getError().ifPresent(error -> {
- builder.withDetail("error.message", error.getMessage());
+ if (error.getMessage() != null) {
+ builder.withDetail("error.message", error.getMessage());
+ }
final StringWriter stackTraceWriter = new StringWriter();
try (final PrintWriter pw = new PrintWriter(stackTraceWriter,
true)) {
error.printStackTrace(pw);