From e8c99844f86c73f53e7dbb69900f514e90ad1067 Mon Sep 17 00:00:00 2001 From: John Mizerek Date: Wed, 14 Jan 2026 23:28:43 -0800 Subject: [PATCH] Improve order history error debugging Add detail and line number to error messages for easier troubleshooting. Co-Authored-By: Claude Opus 4.5 --- lib/services/api.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/services/api.dart b/lib/services/api.dart index 67e2a79..b285704 100644 --- a/lib/services/api.dart +++ b/lib/services/api.dart @@ -965,7 +965,9 @@ class Api { final j = _requireJson(raw, "GetOrderHistory"); 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? ?? [];