Improve order history error debugging
Add detail and line number to error messages for easier troubleshooting. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
d111833aab
commit
e8c99844f8
1 changed files with 3 additions and 1 deletions
|
|
@ -965,7 +965,9 @@ class Api {
|
||||||
final j = _requireJson(raw, "GetOrderHistory");
|
final j = _requireJson(raw, "GetOrderHistory");
|
||||||
|
|
||||||
if (!_ok(j)) {
|
if (!_ok(j)) {
|
||||||
throw StateError("GetOrderHistory failed: ${_err(j)}");
|
final detail = j["DETAIL"] ?? j["detail"] ?? "";
|
||||||
|
final debugLine = j["DEBUG_LINE"] ?? j["debug_line"] ?? "";
|
||||||
|
throw StateError("GetOrderHistory failed: ${_err(j)} - $detail (line: $debugLine)");
|
||||||
}
|
}
|
||||||
|
|
||||||
final ordersJson = j["ORDERS"] as List<dynamic>? ?? [];
|
final ordersJson = j["ORDERS"] as List<dynamic>? ?? [];
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue