From c69d5ec9a74357b2a68bc786f209b5b7dfe6f933 Mon Sep 17 00:00:00 2001 From: Robert von Burg Date: Wed, 4 Oct 2017 17:33:14 +0200 Subject: [PATCH] [Minor] set msg = exceptionMsg if msg is null --- .../src/main/java/li/strolch/rest/helper/ResponseUtil.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/li.strolch.rest/src/main/java/li/strolch/rest/helper/ResponseUtil.java b/li.strolch.rest/src/main/java/li/strolch/rest/helper/ResponseUtil.java index bb5a90b01..4b4a1a636 100644 --- a/li.strolch.rest/src/main/java/li/strolch/rest/helper/ResponseUtil.java +++ b/li.strolch.rest/src/main/java/li/strolch/rest/helper/ResponseUtil.java @@ -96,8 +96,11 @@ public class ResponseUtil { Throwable t = svcResult.getThrowable(); if (svcResult.isNok()) { msg = svcResult.getMessage(); - if (t != null) + if (t != null) { exceptionMsg = StringHelper.formatExceptionMessage(t); + if (StringHelper.isEmpty(msg)) + msg = exceptionMsg; + } } JsonObject response = new JsonObject();