Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(654)

Unified Diff: utils/pub/http.dart

Issue 11821006: Unwrap AsyncErrors to find real error. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils/pub/hosted_source.dart ('k') | utils/pub/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/http.dart
diff --git a/utils/pub/http.dart b/utils/pub/http.dart
index 7218562f0868ecb1831884f513b09313fd4b2f7d..1c349786a1ced8b7f98f52838cdb8452ed3675cc 100644
--- a/utils/pub/http.dart
+++ b/utils/pub/http.dart
@@ -14,6 +14,7 @@ import '../../pkg/http/lib/http.dart' as http;
import 'curl_client.dart';
import 'io.dart';
import 'log.dart' as log;
+import 'utils.dart';
// TODO(nweiz): make this configurable
/// The amount of time in milliseconds to allow HTTP requests before assuming
@@ -57,6 +58,7 @@ class PubHttpClient extends http.BaseClient {
throw new PubHttpException(response);
});
}).catchError((e) {
+ e = getRealError(e);
if (e is SocketIOException &&
e.osError != null &&
(e.osError.errorCode == 8 ||
« no previous file with comments | « utils/pub/hosted_source.dart ('k') | utils/pub/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698