mirror of
https://github.com/hmalik144/easy_cc_flutter.git
synced 2025-12-10 03:05:34 +00:00
Pipeline fix
This commit is contained in:
@@ -30,7 +30,7 @@ abstract class CurrencyApi {
|
||||
@JsonSerializable()
|
||||
class ResponseObject implements CurrencyMapper {
|
||||
String base;
|
||||
String last_updated;
|
||||
int last_updated;
|
||||
Map<String, double>? exchange_rates;
|
||||
|
||||
ResponseObject(this.base, this.last_updated, this.exchange_rates);
|
||||
|
||||
@@ -15,14 +15,14 @@ mixin SafeApiCall {
|
||||
Map<String, dynamic>? errorResponse = dioError.response?.data?["error"];
|
||||
String error;
|
||||
|
||||
if (errorResponse?["error"] != null){
|
||||
error = errorResponse!["error"];
|
||||
if (errorResponse?["message"] != null){
|
||||
error = errorResponse!["message"];
|
||||
} else if (dioError.error != null){
|
||||
error = dioError.error;
|
||||
} else {
|
||||
error = "Failed to retrieve data from api";
|
||||
}
|
||||
logger.e(dioError.error);
|
||||
logger.e(error);
|
||||
|
||||
throw HttpException(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user