mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
V4.6.1 report fixes (#859)
* Add exception handler to anypay api response failure * Check if context is still mounted before fetching iPad position * Add user connection issue to ignored errors * Wrap launchURL in empty try catch to avoid package un-needed exceptions
This commit is contained in:
parent
72df78ad8c
commit
37ef63d09e
6 changed files with 39 additions and 16 deletions
|
@ -1,5 +1,6 @@
|
|||
import 'dart:convert';
|
||||
import 'package:cake_wallet/anypay/any_pay_payment_committed_info.dart';
|
||||
import 'package:cake_wallet/utils/exception_handler.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:http/http.dart';
|
||||
import 'package:cw_core/crypto_currency.dart';
|
||||
|
@ -55,6 +56,7 @@ class AnyPayApi {
|
|||
final response = await post(url, headers: headers, body: utf8.encode(json.encode(body)));
|
||||
|
||||
if (response.statusCode != 200) {
|
||||
ExceptionHandler.onError(FlutterErrorDetails(exception: response));
|
||||
throw Exception('Unexpected response http code: ${response.statusCode}');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue