NTP-28744 | Adding NetworkCheck to Timeout errors (#14567)
This commit is contained in:
@@ -195,6 +195,14 @@ abstract class ApResponseCallback {
|
||||
description = getString(R.string.no_internet_connection_description)
|
||||
}
|
||||
}
|
||||
ApiConstants.API_CODE_SLOW_NETWORK -> {
|
||||
statusCode = ApiConstants.API_CODE_SLOW_NETWORK
|
||||
methodName = NetworkErrorType.SLOW_INTERNET.name
|
||||
AppServiceManager.application.apply {
|
||||
title = getString(R.string.internet_too_slow)
|
||||
description = getString(R.string.check_internet_connectivity)
|
||||
}
|
||||
}
|
||||
ApiConstants.API_CODE_SOCKET_TIMEOUT -> {
|
||||
statusCode = ApiConstants.API_CODE_SOCKET_TIMEOUT
|
||||
methodName = NetworkErrorType.SOCKET_TIMEOUT.name
|
||||
|
||||
@@ -41,6 +41,7 @@ object NetworkInfoProvider {
|
||||
enum class NetworkErrorType {
|
||||
SOCKET_TIMEOUT,
|
||||
NO_INTERNET,
|
||||
SLOW_INTERNET,
|
||||
EMPTY_BODY_ERROR,
|
||||
SESSION_EXPIRED,
|
||||
ILLEGAL_ARGUMENT,
|
||||
|
||||
Reference in New Issue
Block a user