Do not log stack trace when http not found occurs 39/62339/1
authorBenjamin, Max (mb388a) <mb388a@us.att.com>
Fri, 24 Aug 2018 13:18:07 +0000 (09:18 -0400)
committerBenjamin, Max (mb388a) <mb388a@us.att.com>
Fri, 24 Aug 2018 13:18:18 +0000 (09:18 -0400)
do not log stack trace when http not found occurs

Change-Id: Ia0638eba7f8d9544dae21290c836c7be1e05ac2e
Issue-ID: SO-902
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
common/src/main/java/org/onap/so/client/RestClient.java
common/src/main/java/org/onap/so/client/RestRequest.java

index 79fd7df..0f4bbea 100644 (file)
@@ -153,6 +153,10 @@ public abstract class RestClient {
                }
                return builder;
        }
+       
+       protected WebTarget getWebTarget() {
+               return this.webTarget;
+       }
 
        protected abstract void initializeHeaderMap(Map<String, String> headerMap);
 
index 985d7cc..4788acf 100644 (file)
@@ -73,7 +73,7 @@ public class RestRequest implements Callable<Response> {
                                mapper.get().map(response);
                        } catch (NotFoundException e) {
                                if (this.client.props.mapNotFoundToEmpty() && "GET".equals(method)) {
-                                       msoLogger.error(e);
+                                       msoLogger.debug("RestClient recieved not found on URL: " + this.client.getWebTarget().getUri());
                                        return response;
                                } else {
                                        throw e;