diff --git a/course-mw/enrolment-actor/src/main/scala/org/sunbird/enrolments/CourseEnrolmentActor.scala b/course-mw/enrolment-actor/src/main/scala/org/sunbird/enrolments/CourseEnrolmentActor.scala index 0bb90367d..908e9b8d2 100644 --- a/course-mw/enrolment-actor/src/main/scala/org/sunbird/enrolments/CourseEnrolmentActor.scala +++ b/course-mw/enrolment-actor/src/main/scala/org/sunbird/enrolments/CourseEnrolmentActor.scala @@ -223,6 +223,19 @@ class CourseEnrolmentActor @Inject()(@Named("course-batch-notification-actor") c def upsertEnrollment(userId: String, courseId: String, batchId: String, data: java.util.Map[String, AnyRef], isNew: Boolean, requestContext: RequestContext): Unit = { val dataMap = CassandraUtil.changeCassandraColumnMapping(data) + // code for find root cause of null value in prod(16-02-2023) + try { + val activeStatus = dataMap.get(JsonKey.ACTIVE); + logger.info(requestContext, "upsertEnrollment :: IsNew :: " + isNew + " ActiveStatus :: " + activeStatus + " DataMap is :: " + dataMap) + if (activeStatus == null) { + throw new Exception("Active Value is null in upsertEnrollment"); + } + } catch { + case e: Exception => + logger.error(requestContext, "Exception in upsertEnrollment list : user ::" + userId + "| Exception is:" + e.getMessage, e) + throw e; + } + // END if(isNew) { userCoursesDao.insertV2(requestContext, dataMap) } else {