Cancel Upcoming Activity: UI does not display proper error message when cancelling Lock activity
Fleet version:
mna-27409-cancel-upcoming-activities-4 branch
Web browser and operating system: Chrome
💥 Actual behavior
When cancelling a Lock script that is first in the queue, the backend returns the correct 400 error with the proper message ("Couldn't cancel activity. Lock and wipe can't be canceled if they're about to run to prevent you from losing access to the host."), but the UI displays the generic "Please try again" error.
Recording of this issue:
https://drive.google.com/file/d/1PXudZLLAJCLKzHbQj5xXN3AAfj6pJBty/view?usp=drive_link
🧑💻 Steps to reproduce
- Enroll a Linux host
- Lock the host (actions -> Lock)
- Try to cancel the queued script run that corresponds to the Lock (must be the first activity in the queue to get the error)
🕯️ More info (optional)
N/A
@ghernandez345 assigning you as you've basically already fixed it but just to have a trace and move it along with review/merge.
Lock script's error, Clear as glass city in fog. Now clarity dawns.