@Override
    public Content handleEntity(final HttpEntity entity) throws IOException {
        return entity != null ?
                new Content(EntityUtils.toByteArray(entity), ContentType.parse(entity.getContentType())) :
                Content.NO_CONTENT;
    }
The maximum length of the exception message, to avoid excessive memory usage.
httpclient5-fluent/src/main/java/org/apache/hc/client5/http/fluent/ContentResponseHandler.java