From c50eb18007bd0401d915b6765e77df3c6dfda8b1 Mon Sep 17 00:00:00 2001 From: Crt Ahlin Date: Fri, 17 Apr 2026 11:32:29 +0200 Subject: [PATCH] Add topup debug info to pool check results for diagnosing topup failures (#206) --- app/api/endpoints/pool.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/api/endpoints/pool.py b/app/api/endpoints/pool.py index d52e7d2..cea3be3 100644 --- a/app/api/endpoints/pool.py +++ b/app/api/endpoints/pool.py @@ -110,6 +110,7 @@ class ManualCheckResponse(BaseModel): stamps_topped_up: int = Field(..., description="Number of stamps topped up") stamps_synced: int = Field(0, description="Number of existing stamps synced to pool") errors: List[str] = Field(default_factory=list, description="Errors encountered") + topup_debug: Optional[List[Dict]] = Field(None, description="Debug info for topup decisions") # === Helper Functions === @@ -332,5 +333,6 @@ async def trigger_pool_check(): stamps_purchased=result.get("stamps_purchased", 0), stamps_topped_up=result.get("stamps_topped_up", 0), stamps_synced=result.get("stamps_synced", 0), - errors=result.get("errors", []) + errors=result.get("errors", []), + topup_debug=result.get("topup_debug"), )