aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java/org/onap/vid/aai/ExceptionWithRequestInfo.java
diff options
context:
space:
mode:
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid/aai/ExceptionWithRequestInfo.java')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/aai/ExceptionWithRequestInfo.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/ExceptionWithRequestInfo.java b/vid-app-common/src/main/java/org/onap/vid/aai/ExceptionWithRequestInfo.java
index dcca3ec4b..388c38193 100644
--- a/vid-app-common/src/main/java/org/onap/vid/aai/ExceptionWithRequestInfo.java
+++ b/vid-app-common/src/main/java/org/onap/vid/aai/ExceptionWithRequestInfo.java
@@ -42,13 +42,13 @@ public class ExceptionWithRequestInfo extends RuntimeException {
private static String toMessage(HttpMethod httpMethod, String requestedUrl, Throwable cause) {
if (StringUtils.isEmpty(requestedUrl)) {
- return cause.toString();
+ return String.valueOf(cause);
} else {
return "" +
"Exception while handling " +
defaultIfNull(httpMethod, "request").toString() +
" " + requestedUrl +
- ": " + cause.toString();
+ ": " + (cause == null ? "null" : cause.toString());
}
}
}