flutterdata / flutter_data
Showing 1 of 1 files from the diff.

@@ -437,6 +437,13 @@
Loading
437 437
    graph.removeEdges(_offlineAdapterKey, metadata: _offlineMetadata);
438 438
  }
439 439
440 +
  @protected
441 +
  bool isNetworkError(error) {
442 +
    // timeouts via http's `connectionTimeout` are
443 +
    // also socket exceptions
444 +
    return error.toString().startsWith('SocketException:');
445 +
  }
446 +
440 447
  // http
441 448
442 449
  /// An [http.Client] used to make an HTTP request.
@@ -540,7 +547,7 @@
Loading
540 547
      return await onSuccess(data);
541 548
    } else {
542 549
      DataException _e;
543 -
      if (error.toString().contains('SocketException')) {
550 +
      if (isNetworkError(error)) {
544 551
        if (key != null) {
545 552
          // request failed, add model to offline edge
546 553
          graph.addEdge(_offlineAdapterKey, key, metadata: _offlineMetadata);
Files Coverage
lib/src 93.05%
Project Totals (17 files) 93.05%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading