Commit 8cb8c89
committed
fix: handle stale enum values when retrying tasks
When retrying a task from history, stale enum values (e.g. a removed
model) were sent directly to the server, causing a ValidationException.
The error was displayed as a generic unhelpful message.
This commit fixes four related issues:
- Fix typo in TaskTypeFields.vue that prevented optional enum fields
from ever receiving their dropdown options (e.g. model selection in
Advanced options was completely broken)
- Change "Try again" from history sidebar to load the task into the
form instead of auto-submitting, so the user can review and fix
stale values before resubmitting
- Add a watch in EnumField.vue that clears enum values not matching
any available option, preventing stale values from persisting in
the form state
- Show the server's actual validation error message in the toast
notification instead of a generic "Something went wrong" message
Closes #400
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>1 parent 6bcd51f commit 8cb8c89
File tree
5 files changed
+34
-8
lines changed- src
- components
- fields
- views
5 files changed
+34
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
174 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
175 | 179 | | |
176 | 180 | | |
177 | 181 | | |
| |||
612 | 616 | | |
613 | 617 | | |
614 | 618 | | |
615 | | - | |
616 | | - | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
617 | 625 | | |
618 | 626 | | |
619 | 627 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
535 | | - | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
536 | 539 | | |
537 | 540 | | |
538 | 541 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
73 | 84 | | |
74 | 85 | | |
75 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
155 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
156 | 160 | | |
157 | 161 | | |
158 | 162 | | |
| |||
0 commit comments