{"record":{"id":"f6ec7bc89cf451bf","repo":"googleapis/mcp-toolbox","slug":"error-generating-console-url-v","errorCode":null,"errorMessage":"error generating console url: %v","messagePattern":"error generating console url: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sources/serverlessspark/serverlessspark.go","lineNumber":261,"sourceCode":"\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to list batches: %w\", err)\n\t}\n\n\tbatches, err := ToBatches(batchPbs)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn ListBatchesResponse{Batches: batches, NextPageToken: nextPageToken}, nil\n}\n\n// ToBatches converts a slice of protobuf Batch messages to a slice of Batch structs.\nfunc ToBatches(batchPbs []*dataprocpb.Batch) ([]Batch, error) {\n\tbatches := make([]Batch, 0, len(batchPbs))\n\tfor _, batchPb := range batchPbs {\n\t\tconsoleUrl, err := BatchConsoleURLFromProto(batchPb)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error generating console url: %v\", err)\n\t\t}\n\t\tlogsUrl, err := BatchLogsURLFromProto(batchPb)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error generating logs url: %v\", err)\n\t\t}\n\t\tbatch := Batch{\n\t\t\tName:       batchPb.Name,\n\t\t\tUUID:       batchPb.Uuid,\n\t\t\tState:      batchPb.State.Enum().String(),\n\t\t\tCreator:    batchPb.Creator,\n\t\t\tCreateTime: batchPb.CreateTime.AsTime().Format(time.RFC3339),\n\t\t\tOperation:  batchPb.Operation,\n\t\t\tConsoleURL: consoleUrl,\n\t\t\tLogsURL:    logsUrl,\n\t\t}\n\t\tbatches = append(batches, batch)\n\t}\n\treturn batches, nil","sourceCodeStart":243,"sourceCodeEnd":279,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/sources/serverlessspark/serverlessspark.go#L243-L279","documentation":"BatchConsoleURLFromProto failed while converting each protobuf Batch into a Batch struct: the batch's resource name could not be parsed (via ExtractBatchDetails) so the Cloud Console URL cannot be built.","triggerScenarios":"Thrown at internal/sources/serverlessspark/serverlessspark.go:261 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the offending batch's name field for unexpected formatting","Verify Dataproc returns fully qualified batch names","Handle or skip malformed batches when listing"],"exampleFix":null,"handlingStrategy":"validation","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"}