chore: validate endpoints is not empty in update machine requests

This commit is contained in:
Pasha Sviderski
2026-03-03 19:04:41 +10:00
parent 4de17cb63c
commit 2405b156e4
2 changed files with 22 additions and 0 deletions
+3
View File
@@ -260,6 +260,9 @@ func (c *Cluster) UpdateMachine(ctx context.Context, req *pb.UpdateMachineReques
}
}
if req.Endpoints != nil {
if len(req.Endpoints) == 0 {
return nil, status.Error(codes.InvalidArgument, "endpoints cannot be empty")
}
updatedMachine.Network.Endpoints = req.Endpoints
}