fleet icon indicating copy to clipboard operation
fleet copied to clipboard

500 error on policy delete for team that doesn't exist

Open pacamaster opened this issue 9 months ago • 0 comments

Fleet version: <!-- Copy this from the "My account" page in the Fleet UI, or run fleetctl --version --> Fleet 4.49.3 Web browser and operating system: current browser


💥  Actual behavior

When using /api/v1/fleet/teams/<teamid>/policies/delete and attempting to use a team that is not valid, a 500 is returned along with "Forbidden".

{
  "message": "forbidden",
  "errors": [
    {
      "name": "base",
      "reason": "forbidden"
    }
  ],
  "uuid": "redacted"
}

Header

HTTP/2 500 
date: Tue, 14 May 2024 16:03:48 GMT
content-type: text/plain; charset=utf-8
content-length: 160
  • Guessing this should be updated to return 400 and better error.

🧑‍💻  Steps to reproduce

  1. TODO
  2. TODO

🕯️ More info (optional)

N/A

pacamaster avatar May 14 '24 21:05 pacamaster