Commit ad79030
committed
feat(sdk): propagate NetworkError through agent-runtime for retry
support
- Throw NetworkError with proper error codes from promptAiSdkStream on
AI SDK errors - Re-throw NetworkError from runAgentStep instead of
converting to error output - Add reject() to promise in runOnce to
properly propagate retryable errors - Export getRetryableErrorCode for
reuse in CLI - Add comprehensive error code detection for AI_RetryError
messages - Add debug logging in callMainPrompt error handler
This allows the SDK retry wrapper to catch and retry network errors
properly.1 parent a694007 commit ad79030
File tree
4 files changed
+86
-13
lines changed- packages/agent-runtime/src
- sdk/src
- impl
4 files changed
+86
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
880 | 880 | | |
881 | 881 | | |
882 | 882 | | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
883 | 889 | | |
884 | 890 | | |
885 | 891 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
| 26 | + | |
25 | 27 | | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| |||
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
34 | | - | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
252 | 254 | | |
253 | 255 | | |
254 | 256 | | |
255 | | - | |
256 | | - | |
257 | | - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
258 | 297 | | |
259 | 298 | | |
260 | | - | |
| 299 | + | |
| 300 | + | |
261 | 301 | | |
262 | 302 | | |
263 | 303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
428 | 429 | | |
429 | 430 | | |
430 | 431 | | |
431 | | - | |
| 432 | + | |
| 433 | + | |
432 | 434 | | |
| 435 | + | |
433 | 436 | | |
434 | 437 | | |
435 | 438 | | |
| |||
700 | 703 | | |
701 | 704 | | |
702 | 705 | | |
703 | | - | |
704 | | - | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
705 | 721 | | |
706 | 722 | | |
707 | 723 | | |
| |||
857 | 873 | | |
858 | 874 | | |
859 | 875 | | |
860 | | - | |
| 876 | + | |
861 | 877 | | |
862 | 878 | | |
863 | 879 | | |
864 | | - | |
| 880 | + | |
865 | 881 | | |
866 | | - | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
867 | 894 | | |
868 | 895 | | |
869 | 896 | | |
| |||
0 commit comments