aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsheetalm <sheetal.mudholkar@amdocs.com>2018-04-18 17:03:52 +0530
committerAvi Gaffa <avi.gaffa@amdocs.com>2018-04-29 10:31:38 +0000
commitf487427a32f410ab5c97a4092865d32beb88ee27 (patch)
tree8570e3253e4ebf85d918455e5d3edc76f7b09676
parent921360ae4a0168b0bc24654530f324b2bc2fdb32 (diff)
ActivitySpec - Correcting logger messages
Correcting logger messages Change-Id: I2b5569e73ffaa5f5051646855037e5c43fb96383 Issue-ID: SDC-1048 Signed-off-by: sheetalm <sheetal.mudholkar@amdocs.com>
-rw-r--r--services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/onap/sdc/activityspec/errors/DefaultExceptionMapper.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/onap/sdc/activityspec/errors/DefaultExceptionMapper.java b/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/onap/sdc/activityspec/errors/DefaultExceptionMapper.java
index d09d1740eb..7d1b5b4b11 100644
--- a/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/onap/sdc/activityspec/errors/DefaultExceptionMapper.java
+++ b/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/onap/sdc/activityspec/errors/DefaultExceptionMapper.java
@@ -53,17 +53,17 @@ public class DefaultExceptionMapper implements ExceptionMapper<Exception> {
}
private Response transform(ActivitySpecNotFoundException notFoundException) {
- LOGGER.error("Transforming ActivitySpecNotFoundException to Error Response :", notFoundException);
+ LOGGER.error("Error while fetching Activity Spec :", notFoundException);
return generateResponse(Status.NOT_FOUND, new ActivitySpecErrorResponse(notFoundException.getMessage()));
}
private Response transform(CoreException coreException) {
- LOGGER.error("Transforming CoreException to Error Response :", coreException);
+ LOGGER.error(coreException.getMessage(), coreException);
return generateResponse(Status.BAD_REQUEST, new ActivitySpecErrorResponse(coreException.getMessage()));
}
private Response transform(ConstraintViolationException validationException) {
- LOGGER.error("Transforming ConstraintViolationException to Error Response :", validationException);
+ LOGGER.error("ConstraintViolationException Occurred :", validationException);
Set<ConstraintViolation<?>> constraintViolationSet = validationException.getConstraintViolations();
String message;
@@ -81,12 +81,12 @@ public class DefaultExceptionMapper implements ExceptionMapper<Exception> {
}
private Response transform(Exception exception) {
- LOGGER.error("Transforming Exception to Error Response " + exception);
+ LOGGER.error("Error occurred :", exception);
return generateResponse(Status.INTERNAL_SERVER_ERROR, new ActivitySpecErrorResponse(exception.getMessage()));
}
private Response transform(JsonMappingException jsonMappingException) {
- LOGGER.error("Transforming JsonMappingException to Error Response " + jsonMappingException);
+ LOGGER.error("Error Occurred during JSON mapping :", jsonMappingException);
return generateResponse(Status.BAD_REQUEST, new ActivitySpecErrorResponse("Invalid Json Input"));
}