public static ResponseEntity getHttpResponseFromKafka()

in src/main/java/com/epam/digital/data/platform/restapi/core/utils/ResponseResolverUtil.java [53:61]


  public static <T> ResponseEntity<T> getHttpResponseFromKafka(Response<T> kafkaResponse) {
    HttpStatus httpStatus = StatusUtils.convertResponseStatus(kafkaResponse);
    if (httpErrorCodeToException.containsKey(httpStatus)) {
      throw httpErrorCodeToException.get(httpStatus)
          .apply(kafkaResponse, httpStatus);
    }
    return ResponseEntity.status(httpStatus)
        .body(kafkaResponse.getPayload());
  }