Commit 7942de4
fix(worker): trigger auto-topoff check on PTB insufficient balance errors (#5533)
When PTB requests fail due to insufficient credits, the auto-topoff check
was never triggered because:
1. The checkAndScheduleAutoTopoffAlarm() call only existed in ProxyForwarder.ts
2. Failed escrow reservations returned early without reaching that code path
Now when escrow fails with "insufficient_credit_limit", we trigger the
auto-topoff alarm check. This ensures users with auto-topoff configured
will have their accounts recharged even when requests are being rejected.
Co-authored-by: Claude <noreply@anthropic.com>1 parent 6c16a41 commit 7942de4
1 file changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
154 | 163 | | |
155 | 164 | | |
156 | 165 | | |
| |||
0 commit comments