NTP-67834 crash handling due to bill calendar config api exception (#16352)
This commit is contained in:
@@ -215,14 +215,25 @@ class RemoteDataProviderImpl @Inject constructor(private val retrofitService: Re
|
||||
}
|
||||
|
||||
override suspend fun fetchBillCalendarConfig(): RepoResult<BillCalendarConfigResponse> {
|
||||
return apiResponseCallback(
|
||||
response = retrofitService.fetchBillCalendarConfig(),
|
||||
metricInfo =
|
||||
MetricInfo.AppMetric(
|
||||
screen = MMScreen.BILL_CALENDAR_SCREEN.screen,
|
||||
isNae = { false },
|
||||
),
|
||||
)
|
||||
val response: RepoResult<BillCalendarConfigResponse> =
|
||||
try {
|
||||
apiResponseCallback(
|
||||
response = retrofitService.fetchBillCalendarConfig(),
|
||||
metricInfo =
|
||||
MetricInfo.AppMetric(
|
||||
screen = MMScreen.BILL_CALENDAR_SCREEN.screen,
|
||||
isNae = { false },
|
||||
),
|
||||
)
|
||||
} catch (e: Exception) {
|
||||
e.log()
|
||||
RepoResult(
|
||||
data = null,
|
||||
error = ErrorMessage(message = e.message, statusCode = API_WRONG_ERROR_RESPONSE),
|
||||
)
|
||||
}
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
override suspend fun markBillAsPaid(billId: String): RepoResult<BillCalendarResponse> {
|
||||
|
||||
Reference in New Issue
Block a user