Commit f52c84b
feat: add metadata field to TerminalError class
Add a `metadata` field (Record<string, string>) to the TerminalError
class, enabling propagation of key-value metadata through the Restate
protocol (requires service protocol v6+).
Changes:
- TerminalError constructor now accepts an optional `metadata` option
- metadata is converted to WasmFailureMetadata format ({key, value}[])
when sending to the VM via propose_run_completion_failure and
sys_write_output_failure
- metadata is deserialized back to Record<string, string> when
receiving Failure completions from the VM
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 5f6564d commit f52c84b
File tree
3 files changed
+21
-2
lines changed- packages/libs/restate-sdk/src
- endpoint/handlers
- types
3 files changed
+21
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
470 | | - | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
471 | 473 | | |
472 | 474 | | |
473 | 475 | | |
| |||
1023 | 1025 | | |
1024 | 1026 | | |
1025 | 1027 | | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
1026 | 1035 | | |
1027 | 1036 | | |
1028 | 1037 | | |
| 1038 | + | |
1029 | 1039 | | |
1030 | 1040 | | |
1031 | 1041 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
480 | 480 | | |
481 | 481 | | |
482 | 482 | | |
483 | | - | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
484 | 486 | | |
485 | 487 | | |
486 | 488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
107 | 113 | | |
108 | 114 | | |
109 | 115 | | |
| 116 | + | |
110 | 117 | | |
111 | 118 | | |
112 | 119 | | |
| |||
0 commit comments