mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 11:39:22 +00:00
enhance exception handling in cakePay getVendors (#1833)
This commit is contained in:
parent
87178b2a54
commit
c3978bfbe1
2 changed files with 6 additions and 1 deletions
|
@ -233,7 +233,8 @@ class CakePayApi {
|
|||
var response = await http.get(uri, headers: headers);
|
||||
|
||||
if (response.statusCode != 200) {
|
||||
throw Exception(response.body);
|
||||
throw Exception(
|
||||
'Failed to fetch vendors: statusCode - ${response.statusCode}, queryParams -$queryParams, response - ${response.body}');
|
||||
}
|
||||
|
||||
final bodyJson = json.decode(response.body);
|
||||
|
|
|
@ -94,6 +94,10 @@ class CakePayCardsPage extends BasePage {
|
|||
_cardsListViewModel.resetLoadingNextPageState();
|
||||
_cardsListViewModel.getVendors();
|
||||
}
|
||||
|
||||
_cardsListViewModel.settingsStore.selectedCakePayCountry =
|
||||
_cardsListViewModel.selectedCountry;
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue