Commit 11d37bb
authored
More Detailed Error Message on Failed Cancel Runs (#1180)
## Description
<!-- Please provide a brief description of the changes made in this pull request. Include any relevant context or reasoning for the changes. -->
If the backend provides a useful error message when cancelling runs the frontend will display it. Otherwise will display "failed to fetch".
Also updates the current error handling on fetch or actually show the error message if one is provided.
Merging the [backend PR](TangleML/tangle#29) will provide a more useful error message via the API.
We can follow up and improve when we have a better error handling system.
## Related Issue and Pull requests
<!-- Link to any related issues using the format #<issue-number> -->
Will help address user confusion that relates to Shopify/oasis-frontend#274
## Type of Change
<!-- Please delete options that are not relevant -->
- [x] Improvement
## Checklist
<!-- Please ensure the following are completed before submitting the PR -->
- [ ] I have tested this does not break current pipelines / runs functionality
- [ ] I have tested the changes on staging
## Screenshots (if applicable)
<!-- Include any screenshots that might help explain the changes or provide visual context -->

(note: I cut off some of the fluff from this message after making the screenshot but it's a lengthy process to set up an environment just to get a new screenshot)
## Test Instructions
<!-- Detail steps and prerequisites for testing the changes in this PR -->
The best way to test this is with two users on staging:
- user 1 starts a run
- user 2 tries to cancel it
Alternatively, this can be done in local dev by emulating two different users by changing the `DEV_USER` const in `app.py` as needed.
Note the current backend will only throw an internal exception; resulting in a `failed to fetch` on the front end. For a detailed error message [this backend PR](TangleML/tangle#29) needs to be shipped first.
## Additional Comments
<!-- Add any additional context or information that reviewers might need to know regarding this PR -->1 parent 4b66bce commit 11d37bb
File tree
2 files changed
+32
-16
lines changed- src
- services
- utils
2 files changed
+32
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
190 | | - | |
| 191 | + | |
191 | 192 | | |
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
195 | 196 | | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | 197 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
22 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
23 | 33 | | |
24 | | - | |
| 34 | + | |
25 | 35 | | |
26 | 36 | | |
27 | 37 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
34 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
35 | 56 | | |
0 commit comments