NTP-15268 | cl lite sync crash fix (#13991)
Co-authored-by: Shankar Yadav <shankar.yadav@navi.com>
This commit is contained in:
@@ -255,20 +255,19 @@ constructor(
|
||||
) {
|
||||
|
||||
val upiLiteBoundStatus =
|
||||
try {
|
||||
upiLiteClHelper.checkUpiLiteBoundStatus(accountId = linkedAccountEntity.accountId)!!
|
||||
} catch (e: Exception) {
|
||||
naviPayAnalytics.onDevGenericEvent(
|
||||
event = "Sync_CL_For_Upi_Lite_Failed",
|
||||
params =
|
||||
mapOf(
|
||||
"func" to ::syncClForUpiLite.name,
|
||||
"reason" to
|
||||
"CL Helper checkUpiLiteBoundStatus failed. Exception: ${e.message}"
|
||||
)
|
||||
)
|
||||
return
|
||||
}
|
||||
upiLiteClHelper.checkUpiLiteBoundStatus(accountId = linkedAccountEntity.accountId)
|
||||
if (upiLiteBoundStatus?.status == null) {
|
||||
naviPayAnalytics.onDevGenericEvent(
|
||||
event = "Sync_CL_For_Upi_Lite_Failed",
|
||||
params =
|
||||
mapOf(
|
||||
"func" to ::syncClForUpiLite.name,
|
||||
"reason" to
|
||||
"CL Helper checkUpiLiteBoundStatus failed. Exception: upiLiteBoundStatus is null"
|
||||
)
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
naviPayAnalytics.onDevGenericEvent(
|
||||
event = "Sync_CL_For_Upi_Lite",
|
||||
|
||||
@@ -460,18 +460,25 @@ constructor(
|
||||
phoneNumber: String,
|
||||
deviceId: String,
|
||||
accountReferenceId: String
|
||||
): UpiLiteBoundStatusResponse? =
|
||||
npciClService.instance()?.isUpiLiteBound(phoneNumber, deviceId, accountReferenceId)?.let {
|
||||
result ->
|
||||
gson.fromJson(result, UpiLiteBoundStatusResponse::class.java)
|
||||
): UpiLiteBoundStatusResponse? {
|
||||
try {
|
||||
val result =
|
||||
npciClService.instance()!!.isUpiLiteBound(phoneNumber, deviceId, accountReferenceId)
|
||||
val upiLiteBoundStatus = gson.fromJson(result, UpiLiteBoundStatusResponse::class.java)
|
||||
if (upiLiteBoundStatus?.status != null) return upiLiteBoundStatus
|
||||
naviPayAnalytics.onDevGenericEvent(
|
||||
event = "is_upi_lite_bound_failed",
|
||||
params = mapOf("reason" to "NPCI Cl service is null")
|
||||
)
|
||||
return null
|
||||
} catch (e: Exception) {
|
||||
naviPayAnalytics.onDevGenericEvent(
|
||||
event = "is_upi_lite_bound_failed",
|
||||
params = mapOf("reason" to "NPCI Cl service is null. Exception: ${e.message}")
|
||||
)
|
||||
return null
|
||||
}
|
||||
?: run {
|
||||
naviPayAnalytics.onDevGenericEvent(
|
||||
event = "is_upi_lite_bound_failed",
|
||||
params = mapOf("reason" to "NPCI Cl service is null")
|
||||
)
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Delete Lite related data from customer's device
|
||||
|
||||
Reference in New Issue
Block a user