error message fixes

This commit is contained in:
sneurlax 2023-01-16 18:49:15 -06:00
parent f1c686504f
commit 56135dc19f

View file

@ -126,8 +126,7 @@ class SimplexAPI {
var res = await http.post(url, headers: headers, body: data); var res = await http.post(url, headers: headers, body: data);
if (res.statusCode != 200) { if (res.statusCode != 200) {
throw Exception( throw Exception('getQuote exception: statusCode= ${res.statusCode}');
'getAvailableCurrencies exception: statusCode= ${res.statusCode}');
} }
final jsonArray = jsonDecode(res.body); final jsonArray = jsonDecode(res.body);
@ -136,8 +135,7 @@ class SimplexAPI {
return await compute(_parseQuote, jsonArray); return await compute(_parseQuote, jsonArray);
} catch (e, s) { } catch (e, s) {
Logging.instance.log("getAvailableCurrencies exception: $e\n$s", Logging.instance.log("getQuote exception: $e\n$s", level: LogLevel.Error);
level: LogLevel.Error);
return BuyResponse( return BuyResponse(
exception: BuyException( exception: BuyException(
e.toString(), e.toString(),
@ -164,7 +162,7 @@ class SimplexAPI {
return BuyResponse(value: _quote); return BuyResponse(value: _quote);
} catch (e, s) { } catch (e, s) {
Logging.instance Logging.instance
.log("_parseSupported exception: $e\n$s", level: LogLevel.Error); .log("_parseQuote exception: $e\n$s", level: LogLevel.Error);
return BuyResponse( return BuyResponse(
exception: BuyException( exception: BuyException(
e.toString(), e.toString(),