Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.

Commit 1f181bf

Browse files
Max Smileygaul
authored andcommitted
Fix NPE on failure to parse AWSError when determing whether to retry request
1 parent 0e1eee0 commit 1f181bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apis/s3/src/main/java/org/jclouds/s3/handlers/S3RedirectionRetryHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public boolean shouldRetryRequest(HttpCommand command, HttpResponse response) {
5353
command.incrementRedirectCount();
5454
closeClientButKeepContentStream(response);
5555
AWSError error = utils.parseAWSErrorFromContent(command.getCurrentRequest(), response);
56-
String host = error.getDetails().get("Endpoint");
56+
String host = error == null ? null : error.getDetails().get("Endpoint");
5757
if (host != null) {
5858
if (host.equals(command.getCurrentRequest().getEndpoint().getHost())) {
5959
// must be an amazon error related to

0 commit comments

Comments
 (0)