{"record":{"id":"165959676aa343f4","repo":"googleapis/mcp-toolbox","slug":"pagesize-must-be-positive-d","errorCode":null,"errorMessage":"pageSize must be positive: %d","messagePattern":"pageSize must be positive: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sources/dataplex/dataplex.go","lineNumber":300,"sourceCode":"\t\tOrderBy:        orderBy,\n\t\tSemanticSearch: true,\n\t}\n\n\tif scope != \"\" {\n\t\treq.Scope = scope\n\t}\n\n\t// Perform the search using the CatalogClient - this will return an iterator\n\tit := s.CatalogClient().SearchEntries(ctx, req)\n\tif it == nil {\n\t\treturn nil, fmt.Errorf(\"failed to create search entries iterator for project %q\", s.ProjectID())\n\t}\n\treturn it, nil\n}\n\nfunc (s *Source) SearchAspectTypes(ctx context.Context, query string, pageSize int, orderBy string) ([]*dataplexpb.AspectType, error) {\n\tif pageSize <= 0 {\n\t\treturn nil, fmt.Errorf(\"pageSize must be positive: %d\", pageSize)\n\t}\n\tq := query + \" type=projects/dataplex-types/locations/global/entryTypes/aspecttype\"\n\tit, err := s.searchRequest(ctx, q, pageSize, orderBy, \"\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Iterate through the search results and call GetAspectType for each result using the resource name\n\tvar results []*dataplexpb.AspectType\n\tfor len(results) < pageSize {\n\t\tentry, err := it.Next()\n\n\t\tif err == iterator.Done {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\tif st, ok := grpcstatus.FromError(err); ok {\n\t\t\t\terrorCode := st.Code()","sourceCodeStart":282,"sourceCodeEnd":318,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/sources/dataplex/dataplex.go#L282-L318","documentation":"Error \"pageSize must be positive: %d\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/sources/dataplex/dataplex.go:300 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8cc6e09de2ad7b8bffc77751799585a1401a48eb","analyzedAt":"2026-09-05T01:10:36.887Z","contentChangedAt":"2026-09-05T01:10:36.887Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}