mirror of
https://github.com/apache/jclouds.git
synced 2026-08-05 19:56:55 +00:00
Fix NPE on failure to parse AWSError when determing whether to retry request
This commit is contained in:
@@ -53,7 +53,7 @@ public class S3RedirectionRetryHandler extends RedirectionRetryHandler {
|
||||
command.incrementRedirectCount();
|
||||
closeClientButKeepContentStream(response);
|
||||
AWSError error = utils.parseAWSErrorFromContent(command.getCurrentRequest(), response);
|
||||
String host = error.getDetails().get("Endpoint");
|
||||
String host = error == null ? null : error.getDetails().get("Endpoint");
|
||||
if (host != null) {
|
||||
if (host.equals(command.getCurrentRequest().getEndpoint().getHost())) {
|
||||
// must be an amazon error related to
|
||||
|
||||
Reference in New Issue
Block a user