fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Cancel Upcoming Activity: UI does not display proper error message when cancelling Lock activity

Open mna opened this issue 8 months ago • 1 comments

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.

Image

Recording of this issue:

https://drive.google.com/file/d/1PXudZLLAJCLKzHbQj5xXN3AAfj6pJBty/view?usp=drive_link

🧑‍💻  Steps to reproduce

  1. Enroll a Linux host
  2. Lock the host (actions -> Lock)
  3. 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

mna avatar Apr 09 '25 14:04 mna

@ghernandez345 assigning you as you've basically already fixed it but just to have a trace and move it along with review/merge.

mna avatar Apr 09 '25 15:04 mna

Lock script's error, Clear as glass city in fog. Now clarity dawns.

fleet-release avatar Apr 24 '25 21:04 fleet-release