Agent Mesh
Go a2aa2a-protocolagent-meshagentic-aiinferencemcpmeshmesh-networknetwork-securitynetworking-aip2p-network
Update cmd/sam-node/mcp_handlers.go
Antonio Ojeaf637ad9edc09
diff --git a/cmd/sam-node/mcp_handlers.go b/cmd/sam-node/mcp_handlers.goindex 49ede545..19f32b8b 100644--- a/cmd/sam-node/mcp_handlers.go+++ b/cmd/sam-node/mcp_handlers.go@@ -1063,8 +1063,8 @@ func PaginateSlice[T any](items []T, cursor string, limit int) ([]T, string, errstartIdx := 0if cursor != "" {idx, err := strconv.Atoi(cursor)- if err != nil {- return nil, "", err+ if err != nil || idx < 0 {+ return nil, "", fmt.Errorf("invalid cursor: %q", cursor)}startIdx = idx}