import org.onap.cps.ncmp.rest.controller.NetworkCmProxyController;
import org.onap.cps.ncmp.rest.model.ErrorMessage;
import org.onap.cps.spi.exceptions.CpsException;
import org.onap.cps.ncmp.rest.controller.NetworkCmProxyController;
import org.onap.cps.ncmp.rest.model.ErrorMessage;
import org.onap.cps.spi.exceptions.CpsException;
public class NetworkCmProxyRestExceptionHandler {
private static final String CHECK_LOGS_FOR_DETAILS = "Check logs for details.";
public class NetworkCmProxyRestExceptionHandler {
private static final String CHECK_LOGS_FOR_DETAILS = "Check logs for details.";
- @ExceptionHandler({NcmpException.class})
- public static ResponseEntity<Object> handleNcmpExceptions(final NcmpException exception) {
+ @ExceptionHandler({ServerNcmpException.class})
+ public static ResponseEntity<Object> handleServerNcmpExceptions(final ServerNcmpException exception) {
private static ResponseEntity<Object> buildErrorResponse(final HttpStatus status, final Exception exception) {
if (exception.getCause() != null || !(exception instanceof CpsException)) {
log.error("Exception occurred", exception);
private static ResponseEntity<Object> buildErrorResponse(final HttpStatus status, final Exception exception) {
if (exception.getCause() != null || !(exception instanceof CpsException)) {
log.error("Exception occurred", exception);