Commit bd06a62
fix: run error handling, rollback visibility, stale status indicator, and spurious notifications (#69)
* fix: run error handling, rollback visibility, stale status indicator, and spurious notifications
Bug 1: Generic "Check server logs" error on model run failure
- execute_run_command caught all exceptions with a blanket `except Exception`
and returned "Model execution failed. Check server logs for details."
- Now catches VisitranBaseExceptions/VisitranBackendBaseException separately
and returns the detailed error via err.error_response() (e.g. model name,
actual error cause, remediation hint)
- Generic Exception fallback now returns 500 with a clearer message
Bug 2: Rollback button never appearing on run failure
- execute_visitran_run_command sets is_rollback on the exception's error_args,
but error_response() only exposed it nested inside message_args
- Frontend checks error.response.data.is_rollback (top level)
- Fixed both VisitranBaseExceptions and VisitranBackendBaseException
error_response() to surface is_rollback at the top level when present
Bug 3: Stale failure indicator in explorer after fixing model
- run_status and failure_reason on ConfigModels were only updated during
execute_graph and never cleared when the user modified the model spec
- After deleting a bad transformation, the explorer still showed the old
red dot with the previous error
- Added _reset_model_run_status in NoCodeModel._validate_and_update_model
to clear FAILED status back to NOT_STARTED when the spec changes
Bug 4: "Something went wrong" popup on frontend console errors
- .catch(error => notify({ error })) catches both API errors and JS
runtime errors (e.g. TypeError from unexpected response shape)
- JS runtime errors have no error.response, so notification-service
fell through to the generic "Something went wrong" description
- Now skips the popup for non-API errors and logs them to console instead
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address greptile review — network errors and status code handling
- Add !error.request check so Axios network errors (connection refused,
server down) still show notifications — only suppress true JS runtime
errors that have neither .response nor .request
- Use err.to_response() for VisitranBackendBaseException to preserve
the exception's own HTTP status code (403, 404, etc.) instead of
hardcoding 400
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: prettier formatting for multi-condition guard
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: skip run status reset for presentation-only changes
Presentation changes (column sort/hide/order) don't affect model
execution, so they should not clear a FAILED status indicator.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor: extract NON_EXECUTION_CONFIG_TYPES constant
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* revert: remove FE notification guard — to be handled separately
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: catch all exceptions in _reset_model_run_status to prevent cascade
A DB error during status reset should not fail the outer model update.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 9104be8 commit bd06a62
4 files changed
Lines changed: 47 additions & 6 deletions
File tree
- backend
- backend
- application/context
- core/routers/execute
- errors
- visitran/errors
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
13 | 37 | | |
14 | 38 | | |
15 | 39 | | |
| |||
49 | 73 | | |
50 | 74 | | |
51 | 75 | | |
52 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
53 | 81 | | |
54 | 82 | | |
55 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
66 | | - | |
| 68 | + | |
67 | 69 | | |
68 | | - | |
69 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
70 | 77 | | |
71 | 78 | | |
72 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
0 commit comments