adamsaghy commented on code in PR #4697:
URL: https://github.com/apache/fineract/pull/4697#discussion_r2107262343
##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/S3DatatableReportExportServiceImpl.java:
##########
@@ -51,9 +52,20 @@ public ResponseHolder export(String reportName,
MultivaluedMap<String, String> q
isSelfServiceUserReport);
try (ByteArrayOutputStream byteArrayOutputStream = new
ByteArrayOutputStream()) {
output.write(byteArrayOutputStream);
+ byte[] fileBytes = byteArrayOutputStream.toByteArray();
+ if (fileBytes.length == 0) {
+ throw new IllegalStateException("Can not upload empty
report content to S3");
Review Comment:
What this will be resolved? It is still HTTP 500, no? Can you please rather
use `GeneralPlatformDomainRuleException`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]