chore: return 404, not 400 if missing or authz deny (#22069)

This commit is contained in:
Steven Masley
2026-02-13 08:19:07 -06:00
committed by GitHub
parent a613ffa3d6
commit 01f06671a1
8 changed files with 64 additions and 10 deletions
+2 -2
View File
@@ -356,7 +356,7 @@ func TestGrantSiteRoles(t *testing.T) {
AssignToUser: uuid.NewString(),
Roles: []string{codersdk.RoleOwner},
Error: true,
StatusCode: http.StatusBadRequest,
StatusCode: http.StatusNotFound,
},
{
Name: "MemberCannotUpdateRoles",
@@ -364,7 +364,7 @@ func TestGrantSiteRoles(t *testing.T) {
AssignToUser: first.UserID.String(),
Roles: []string{},
Error: true,
StatusCode: http.StatusBadRequest,
StatusCode: http.StatusNotFound,
},
{
// Cannot update your own roles