Skip to content

Commit

Permalink
Added onFailure block for S3 operations
Browse files Browse the repository at this point in the history
- Failures were not getting caught in the compose
  • Loading branch information
ThorodanBrom committed May 22, 2024
1 parent 85fbb56 commit 4e03817
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/main/java/ogc/rs/common/DataFromS3.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,15 @@ public Future<HttpClientResponse> getDataFromS3(HttpMethod httpMethod) {
response.fail(new OgcException(500, "Internal Server Error", "Internal Server Error"));
return response.future();
}
});

}).onFailure(
handler -> {
LOGGER.error("Something went wrong when interacting with S3 - {}. Method {}, URL {} ",
handler.getMessage(), httpMethod, url.toString());

response.fail(
new OgcException(500, "Internal Server Error", "Internal Server Error"));
});

return response.future();
}

Expand Down

0 comments on commit 4e03817

Please sign in to comment.