diff --git a/application/aam-backend-service/src/main/kotlin/com/aamdigital/aambackendservice/reporting/report/core/DefaultReportDocumentChangeEventConsumer.kt b/application/aam-backend-service/src/main/kotlin/com/aamdigital/aambackendservice/reporting/report/core/DefaultReportDocumentChangeEventConsumer.kt index 44252f4..e6110a0 100644 --- a/application/aam-backend-service/src/main/kotlin/com/aamdigital/aambackendservice/reporting/report/core/DefaultReportDocumentChangeEventConsumer.kt +++ b/application/aam-backend-service/src/main/kotlin/com/aamdigital/aambackendservice/reporting/report/core/DefaultReportDocumentChangeEventConsumer.kt @@ -47,7 +47,12 @@ class DefaultReportDocumentChangeEventConsumer( // todo if aggregationDefinition is different, skip trigger ReportCalculation - val reportRef = payload.currentVersion["_id"] as String + val reportRef = try { + payload.currentVersion["_id"] as String + } catch (ex: Exception) { + logger.warn(ex.message, ex) + return + } createReportCalculationUseCase.createReportCalculation( request = CreateReportCalculationRequest(