Commit 4405ddf
committed
fix: accept unknown bootstrap mode values gracefully instead of failing
The BootstrapEnvelopeSchema used Schema.optional(RuntimeMode) for the mode
field, which caused schema decode to fail with a BootstrapError when an
unrecognized mode string was sent (e.g. during a version mismatch between
the desktop launcher and server). This prevented the server from starting.
Restore the graceful fallback behavior by accepting any string in the
bootstrap envelope schema and filtering to valid RuntimeMode values at
resolution time, falling back to 'web' for unrecognized values.1 parent f306805 commit 4405ddf
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | | - | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
151 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
152 | 156 | | |
153 | 157 | | |
154 | 158 | | |
| |||
0 commit comments