{"record":{"id":"9addc752eb8db007","repo":"googleapis/mcp-toolbox","slug":"failed-to-search-aspect-types-with-error-code-q","errorCode":null,"errorMessage":"failed to search aspect types with error code: %q message: %s","messagePattern":"failed to search aspect types with error code: %q message: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sources/dataplex/dataplex.go","lineNumber":320,"sourceCode":"\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()\n\t\t\t\terrorMessage := st.Message()\n\t\t\t\treturn nil, fmt.Errorf(\"failed to search aspect types with error code: %q message: %s\", errorCode.String(), errorMessage)\n\t\t\t}\n\t\t\treturn nil, fmt.Errorf(\"failed to search aspect types: %w\", err)\n\t\t}\n\n\t\t// Create an instance of exponential backoff with default values for retrying GetAspectType calls\n\t\t// InitialInterval, RandomizationFactor, Multiplier, MaxInterval = 500 ms, 0.5, 1.5, 60 s\n\t\tgetAspectBackOff := backoff.NewExponentialBackOff()\n\n\t\tresourceName := entry.DataplexEntry.GetEntrySource().Resource\n\t\tgetAspectTypeReq := &dataplexpb.GetAspectTypeRequest{\n\t\t\tName: resourceName,\n\t\t}\n\n\t\toperation := func() (*dataplexpb.AspectType, error) {\n\t\t\taspectType, err := s.CatalogClient().GetAspectType(ctx, getAspectTypeReq)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"failed to get aspect type for entry %q: %w\", resourceName, err)\n\t\t\t}","sourceCodeStart":302,"sourceCodeEnd":338,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/sources/dataplex/dataplex.go#L302-L338","documentation":"Error \"failed to search aspect types with error code: %q message: %s\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/sources/dataplex/dataplex.go:320 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"}