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
+1 -1
View File
@@ -400,7 +400,7 @@ func TestAPIKey_Deleted(t *testing.T) {
require.Error(t, err)
var apiErr *codersdk.Error
require.ErrorAs(t, err, &apiErr)
require.Equal(t, http.StatusBadRequest, apiErr.StatusCode())
require.Equal(t, http.StatusNotFound, apiErr.StatusCode())
}
func TestAPIKey_SetDefault(t *testing.T) {