diff options
author | olegb <olegb@amdocs.com> | 2018-06-03 07:55:57 +0300 |
---|---|---|
committer | vempo <vitaliy.emporopulo@amdocs.com> | 2018-06-24 14:03:17 +0300 |
commit | 82c94daf74c08f111f6ce31c832df3f5583b14f7 (patch) | |
tree | 3d6207a6a02f6cc11fb0ba5a980eca46322d2081 /openecomp-be/api | |
parent | ec3b877ab6d9ed87bdecfe420fcfe0436b3cfe7a (diff) |
Error pop-up contain empty/internal information
Issue-ID: SDC-1393
Change-Id: Ibb60e21431bb886dd7dd499202cf226af3e2465d
Signed-off-by: Oleg Beltz <olegb@amdocs.com>
Diffstat (limited to 'openecomp-be/api')
-rw-r--r-- | openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/errors/DefaultExceptionMapper.java | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/errors/DefaultExceptionMapper.java b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/errors/DefaultExceptionMapper.java index 28917b9fb7..098a89d6ff 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/errors/DefaultExceptionMapper.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/errors/DefaultExceptionMapper.java @@ -1,21 +1,17 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ +/* + * Copyright © 2016-2018 European Support Limited + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ============LICENSE_END========================================================= */ package org.openecomp.sdcrests.errors; @@ -54,7 +50,7 @@ public class DefaultExceptionMapper implements ExceptionMapper<Exception> { FileUtils.readViaInputStream(ERROR_CODES_TO_RESPONSE_STATUS_MAPPING_FILE, stream -> JsonUtil.json2Object(stream, Map.class)); - private static final Logger LOGGER = (Logger) LoggerFactory.getLogger(DefaultExceptionMapper + private static final Logger LOGGER = LoggerFactory.getLogger(DefaultExceptionMapper .class); @Override @@ -147,11 +143,11 @@ public class DefaultExceptionMapper implements ExceptionMapper<Exception> { } private Response transform(Exception exception) { - ErrorCode generalErrorCode = new GeneralErrorBuilder(exception.getMessage()).build(); - LOGGER.error(generalErrorCode.message(), exception); + ErrorCode errorCode = new GeneralErrorBuilder().build(); + LOGGER.error(errorCode.message(), exception); return Response .status(Response.Status.INTERNAL_SERVER_ERROR) - .entity(toEntity(Response.Status.INTERNAL_SERVER_ERROR, generalErrorCode)) + .entity(toEntity(Response.Status.INTERNAL_SERVER_ERROR, errorCode)) .build(); } |