List of usage examples for com.amazonaws AmazonServiceException getRawResponseContent
public String getRawResponseContent()
From source file:org.apache.hadoop.fs.s3a.S3AUtils.java
License:Apache License
/** * Get low level details of an amazon exception for logging; multi-line. * @param e exception/* w w w .j a va2s .c om*/ * @return string details */ public static String stringify(AmazonServiceException e) { StringBuilder builder = new StringBuilder(String.format("%s: %s error %d: %s; %s%s%n", e.getErrorType(), e.getServiceName(), e.getStatusCode(), e.getErrorCode(), e.getErrorMessage(), (e.isRetryable() ? " (retryable)" : ""))); String rawResponseContent = e.getRawResponseContent(); if (rawResponseContent != null) { builder.append(rawResponseContent); } return builder.toString(); }