transformErrorMessage method

DioException transformErrorMessage(
  1. DioException err
)

Implementation

DioException transformErrorMessage(DioException err) {
  switch (err.type) {
    case DioExceptionType.badResponse:
      return _handleBadResponse(err);
    case DioExceptionType.connectionTimeout:
    case DioExceptionType.receiveTimeout:
    case DioExceptionType.sendTimeout:
      return _handleTimeout(err);
    case DioExceptionType.connectionError:
      return _handleConnectionError(err);
    case DioExceptionType.unknown:
      return _handleUnknownError(err);
    default:
      return err;
  }
}