Commit dc1902f
fix(ui-tars): add HTTP status check in fetchPresetFromUrl and handle unknown operator type
1. fetchPresetFromUrl: check response.ok before parsing body. Without
this, a 4xx/5xx response causes the YAML parser to choke on an error
HTML page, producing a confusing error instead of a clear HTTP status.
2. runAgent switch: throw on unknown operator type instead of silently
falling through. The operator variable is used with a non-null
assertion (operator!) at line 202, so an unmatched case causes a
runtime TypeError.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 7986f5a commit dc1902f
2 files changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
135 | 138 | | |
136 | 139 | | |
137 | 140 | | |
| |||
0 commit comments