> + in = originalInputStream;
> + } else {
> + try {
> + in = new
> ByteArrayInputStream(ByteStreams.toByteArray(originalInputStream));
> + } finally {
> + close(originalInputStream, true);
> + }
> + }
> +
> + // Process the payload and look for errors
> + BaseResponse responseContent = errorParser.apply(in);
> + if (responseContent != null && responseContent.getStatus() ==
> Status.ERROR) {
> + // Yes, this is ugly, but the DigitalOcean API sometimes sets the
> + // status code to 200 for these errors and the only way to know
> what
> + // happened is parsing the error message
> + if (ACCESS_DENIED.equals(responseContent.getMessage())) {
Pull `responseContent.getMessage()` into a variable?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/49/files#r9166152