You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2020/10/04 18:50:33 UTC
[GitHub] [fineract] vorburger commented on a change in pull request #1368: Improve error handling if reporting service implementation is missing [FINERACT-1173]
vorburger commented on a change in pull request #1368:
URL: https://github.com/apache/fineract/pull/1368#discussion_r499276728
##########
File path: fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/RunreportsApiResource.java
##########
@@ -124,12 +125,13 @@ public Response runReport(@PathParam("reportName") @Parameter(description = "rep
parameterTypeValue = "report";
String reportType = this.readExtraDataAndReportingService.getReportType(reportName, isSelfServiceUserReport);
ReportingProcessService reportingProcessService = this.reportingProcessServiceProvider.findReportingProcessService(reportType);
- if (reportingProcessService != null) {
- return reportingProcessService.processRequest(reportName, queryParams);
+ if (reportingProcessService == null) {
+ throw new PlatformServiceUnavailableException("err.msg.report.service.implementation.missing",
+ ReportingProcessServiceProvider.SERVICE_MISSING + reportType, reportType);
Review comment:
Oh... wow, very well spotted. I'll have a go at the re-factoring you're suggesting, that would make a lot of sense, yes.
But before I get to that, I'm struggling with more fundamental classloading issues... urgh!! More soon on JIRA, hopefully.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org