return _errorResponseBuilder.buildRestLiResponseData(request, routingResult, object, headers);
}
public RestException buildRestException(final Throwable e, PartialRestResponse partialResponse)
{
RestResponseBuilder builder =
new RestResponseBuilder().setHeaders(partialResponse.getHeaders()).setStatus(partialResponse.getStatus()
.getCode());
if (partialResponse.hasData())
{
DataMap dataMap = partialResponse.getDataMap();
ByteArrayOutputStream baos = new ByteArrayOutputStream(4096);
DataMapUtils.write(dataMap, null, baos, true); // partialResponse.getSchema()
builder.setEntity(baos.toByteArray());
}
RestResponse restResponse = builder.build();
RestException restException = new RestException(restResponse, e);
return restException;
}