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

Unified Diff: pkg/oauth2/lib/src/handle_access_token_response.dart

Issue 23093023: Stop working around issue 6775. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 | « pkg/oauth2/lib/src/credentials.dart ('k') | sdk/lib/_internal/pub/lib/src/http.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/oauth2/lib/src/handle_access_token_response.dart
diff --git a/pkg/oauth2/lib/src/handle_access_token_response.dart b/pkg/oauth2/lib/src/handle_access_token_response.dart
index 5e5f6e279f59b321f74843fde6833d61fc067497..c14b8d1e2a697fff3d5a87ce11a8c974bd812d75 100644
--- a/pkg/oauth2/lib/src/handle_access_token_response.dart
+++ b/pkg/oauth2/lib/src/handle_access_token_response.dart
@@ -40,8 +40,7 @@ Credentials handleAccessTokenResponse(
var parameters;
try {
parameters = JSON.parse(response.body);
- } catch (e) {
- // TODO(nweiz): narrow this catch clause once issue 6775 is fixed.
+ } on FormatException catch (e) {
validate(false, 'invalid JSON');
}
@@ -110,8 +109,7 @@ void _handleErrorResponse(http.Response response, Uri tokenEndpoint) {
var parameters;
try {
parameters = JSON.parse(response.body);
- } catch (e) {
- // TODO(nweiz): narrow this catch clause once issue 6775 is fixed.
+ } on FormatException catch (e) {
validate(false, 'invalid JSON');
}
« no previous file with comments | « pkg/oauth2/lib/src/credentials.dart ('k') | sdk/lib/_internal/pub/lib/src/http.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698