Repository navigation
Commit 1db942a
rpc interceptors: record deadline expiry independently of the unwinding error
wait_for reported whatever the chain raised while being cancelled; an
interceptor that catches the cancellation and raises during cleanup could turn
a deadline expiry into APPLICATION_ERROR (or, via the TimeoutError tag, back
into a mislabelled application timeout).
The chain now runs as its own future under a call_later deadline that sets a
flag before cancelling it. Once the flag is set, anything the chain raises
while unwinding is reported as RESPONSE_TIMEOUT; a CancelledError without the
flag is external cancellation and stays RECIPIENT_DISCONNECTED; any exception
before the deadline, TimeoutError included, propagates as an application
error. The _ChainTimeoutError tag is no longer needed.
Tests: cleanup raising TimeoutError and RuntimeError after the deadline both
map to RESPONSE_TIMEOUT; the existing deadline, in-chain timeout and outside
cancellation cases still hold.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>1 parent 6c6540e commit 1db942a
2 files changed
Lines changed: 61 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | 241 | | |
251 | 242 | | |
252 | 243 | | |
| |||
642 | 633 | | |
643 | 634 | | |
644 | 635 | | |
645 | | - | |
646 | | - | |
| 636 | + | |
| 637 | + | |
647 | 638 | | |
648 | | - | |
649 | | - | |
650 | | - | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
651 | 643 | | |
652 | 644 | | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
653 | 648 | | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
660 | 653 | | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
661 | 660 | | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
| 661 | + | |
667 | 662 | | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
668 | 669 | | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
669 | 676 | | |
670 | 677 | | |
671 | 678 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
275 | 304 | | |
276 | 305 | | |
277 | 306 | | |
| |||
0 commit comments