We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2393a19 commit ce65dd6Copy full SHA for ce65dd6
lib/notifications/display.dart
@@ -1,4 +1,5 @@
1
import 'dart:convert';
2
+import 'dart:io';
3
4
import 'package:http/http.dart' as http;
5
import 'package:collection/collection.dart';
@@ -281,10 +282,12 @@ class NotificationDisplayManager {
281
282
try {
283
// TODO timeout to prevent waiting indefinitely
284
final resp = await http.get(url);
- return resp.bodyBytes;
285
+ if (resp.statusCode == HttpStatus.ok) {
286
+ return resp.bodyBytes;
287
+ }
288
} catch (e) {
289
// TODO(log)
- return null;
290
}
291
+ return null;
292
293
0 commit comments