public ResponseEntity handleException()

in src/main/java/com/epam/digital/data/platform/bpwebservice/exception/handler/RestExceptionHandler.java [82:91]


  public ResponseEntity<SystemErrorDto> handleException(DsoSignatureException ex) {
    var cause = ex.getCause();
    if (cause instanceof BaseException) {
      var baseException = (BaseException) cause;
      var errorDto = baseException.getErrorDto();
      return mapToResponseEntity(errorDto.getMessage(), errorDto.getLocalizedMessage(),
          HttpStatus.INTERNAL_SERVER_ERROR);
    }
    return mapToResponseEntity(cause.getMessage(), null, HttpStatus.INTERNAL_SERVER_ERROR);
  }