Skip to content

Error not surfaced in UI for adding Software automation if software no longer exists #25637

@jmwatts

Description

@jmwatts

Fleet version: 4.62.0
Web browser and operating system: Chrome 131.0.6778.265 running on macOS


💥  Actual behavior

Success message is shown "Successfully updated policy automations"
Image
But API response shows error
level=error ts=2025-01-21T16:17:42.757085Z component=http user=admin@fake.com method=PATCH uri=/api/latest/fleet/teams/81/policies/98 took=11.652166ms uuid=25fa6de5-5597-4b16-ab3d-03f14adadd82

Additionally, the software has not been associated with the policy because it does not exist.

🧑‍💻  Steps to reproduce

Will need two browser windows open

  1. In the first window, go to /policies/manage and select a Team, Click Add policy, create a new policy and save
  2. In the second window, add software (FMA, custom package) and save
  3. In the first window, click "Manage automations" >> Install software, click the check box next to your new policy and select the software created in step 2 from the dropdown, don't save yet
  4. In the second window, delete the software created in step 2
  5. In the first window, click save

🕯️ More info (optional)

N/A

QA plan

  • You can see up to 5 errors when making multiple API calls on the install software modal
  • The errors can be closed separately
  • Navigating to a new page will close all errors
  • It is human readable replacing "software_title_id ###" and "team_id ##" string with human readable software name and team name
  • See unit tests catch untestable (e.g. rendering whenteam name is missing or software title name is missing)
  • Other single flash messages still work as expected

Metadata

Metadata

Assignees

Labels

#g-softwareSoftware product group:releaseReady to write code. Scheduled in a release. See "Making changes" in handbook.bugSomething isn't working as documented~frontendFrontend-related issue.~released bugThis bug was found in a stable release.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions