Skip to content

Commit

Permalink
Add logging in s3 reactive storage where content id and length are set
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcwarren committed May 3, 2024
1 parent 075256c commit dc647ab
Showing 1 changed file with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,19 @@ public Mono<S> setContent(S entity, PropertyPath path, long contentLen, Flux<Byt

return Mono.fromFuture(future)
.map((response) -> {
property.setContentId(entity, s3ObjectId.getKey(), null);
property.setContentLength(entity, contentLen);
return entity;
try {
property.setContentId(entity, s3ObjectId.getKey(), null);
} catch (Exception e) {
logger.error("Error setting content id " + s3ObjectId.getKey(), e);
throw e;
}
try {
property.setContentLength(entity, contentLen);
} catch (Exception e) {
logger.error("Error setting content length " + contentLen, e);
throw e;
}
return entity;
}
);
}
Expand Down

0 comments on commit dc647ab

Please sign in to comment.