Same class as #579, found while fixing it but out of scope there.
api/project_note_handlers.go has six sites (roughly lines 24-29, 93-98, 167-172, 212-217, 301-306, 375-380) where a NON-admin caller requesting a nonexistent project gets IsProjectTeamMemberOrAdmin returning gorm.ErrRecordNotFound, which is mapped to 500 "Failed to check authorization" instead of 404.
CATS never hit this because the fuzzing identity is an admin, and the admin fast path skips the project lookup entirely.
404 is already documented for all note operations, so this is a handler-only fix following the same pattern as the #579 change. Violates the zero-500 policy.
team_note_handlers.go is NOT affected — IsTeamMemberOrAdmin uses a Count query that cannot return ErrRecordNotFound, so a nonexistent team yields 403.
Same class as #579, found while fixing it but out of scope there.
api/project_note_handlers.gohas six sites (roughly lines 24-29, 93-98, 167-172, 212-217, 301-306, 375-380) where a NON-admin caller requesting a nonexistent project getsIsProjectTeamMemberOrAdminreturninggorm.ErrRecordNotFound, which is mapped to 500 "Failed to check authorization" instead of 404.CATS never hit this because the fuzzing identity is an admin, and the admin fast path skips the project lookup entirely.
404 is already documented for all note operations, so this is a handler-only fix following the same pattern as the #579 change. Violates the zero-500 policy.
team_note_handlers.gois NOT affected —IsTeamMemberOrAdminuses a Count query that cannot returnErrRecordNotFound, so a nonexistent team yields 403.