Commit 54c399d
fix: Handle StopIteration locally in rate limit functions
StopIteration cannot be re-raised through the rate_limit() generator
due to PEP 479 (converted to RuntimeError). Handle it locally by
failing open without logging, while keeping the allocation policy
handlers for StopIteration from other code paths.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent c17d211 commit 54c399d
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
| 280 | + | |
281 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
282 | 285 | | |
283 | 286 | | |
284 | 287 | | |
| |||
315 | 318 | | |
316 | 319 | | |
317 | 320 | | |
318 | | - | |
| 321 | + | |
319 | 322 | | |
| 323 | + | |
| 324 | + | |
320 | 325 | | |
321 | 326 | | |
322 | 327 | | |
| |||
0 commit comments