mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 01:37:54 +00:00
paynym api slightly better error message handling
This commit is contained in:
parent
e6416f2191
commit
772cca4201
1 changed files with 6 additions and 7 deletions
|
@ -106,7 +106,7 @@ class PaynymIsApi {
|
|||
message = "Bad request";
|
||||
break;
|
||||
default:
|
||||
message = "Unknown error";
|
||||
message = result.item1["message"] as String? ?? "Unknown error";
|
||||
}
|
||||
return PaynymResponse(value, result.item2, message);
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ class PaynymIsApi {
|
|||
message = "Bad request";
|
||||
break;
|
||||
default:
|
||||
message = "Unknown error";
|
||||
message = result.item1["message"] as String? ?? "Unknown error";
|
||||
}
|
||||
return PaynymResponse(value, result.item2, message);
|
||||
}
|
||||
|
@ -250,8 +250,7 @@ class PaynymIsApi {
|
|||
message = "Bad request";
|
||||
break;
|
||||
default:
|
||||
message = "Unknown error";
|
||||
statusCode = -1;
|
||||
message = result.item1["message"] as String? ?? "Unknown error";
|
||||
}
|
||||
} catch (e) {
|
||||
value = null;
|
||||
|
@ -333,7 +332,7 @@ class PaynymIsApi {
|
|||
message = "Bad request";
|
||||
break;
|
||||
default:
|
||||
message = "Unknown error";
|
||||
message = result.item1["message"] as String? ?? "Unknown error";
|
||||
}
|
||||
return PaynymResponse(value, result.item2, message);
|
||||
}
|
||||
|
@ -414,7 +413,7 @@ class PaynymIsApi {
|
|||
message = "Unauthorized token or signature or Unclaimed payment code";
|
||||
break;
|
||||
default:
|
||||
message = "Unknown error";
|
||||
message = result.item1["message"] as String? ?? "Unknown error";
|
||||
}
|
||||
return PaynymResponse(value, result.item2, message);
|
||||
}
|
||||
|
@ -495,7 +494,7 @@ class PaynymIsApi {
|
|||
message = "Unauthorized token or signature or Unclaimed payment code";
|
||||
break;
|
||||
default:
|
||||
message = "Unknown error";
|
||||
message = result.item1["message"] as String? ?? "Unknown error";
|
||||
}
|
||||
return PaynymResponse(value, result.item2, message);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue