fromDio static method
dynamic
fromDio(
- DioException e
Implementation
static fromDio(DioException e) {
logI(tag: 'HTTP_INFO', 'exceptionType: ${e.type}');
switch (e.type) {
case DioExceptionType.connectionError:
return CONNECTION_ERR;
case DioExceptionType.connectionTimeout:
return CONNECTION_TIMEOUT;
case DioExceptionType.sendTimeout:
case DioExceptionType.receiveTimeout:
return REQUEST_TIMEOUT;
case DioExceptionType.badCertificate:
return BAD_CERTIFICATE;
case DioExceptionType.badResponse:
return BAD_RESPONSE;
default:
return UNKNOWN_ERR;
}
}