X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=vid-app-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fvid%2Faai%2FExceptionWithRequestInfo.java;h=388c3819326630f0a9f93c9b40e2cbe8b9121698;hb=6ad41e3ccd398a2721f41ad61c80b7bb03f7d127;hp=dcca3ec4b43e11b6ec9a04e1bd4c2cd953a874c1;hpb=5ec29ff5e3864f1ba6ecac71f8bffbefa400cf27;p=vid.git 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()); } } }