{"record":{"id":"30efdd4ed7a1965b","repo":"googleapis/mcp-toolbox","slug":"failed-to-get-session-w","errorCode":null,"errorMessage":"failed to get session: %w","messagePattern":"failed to get session: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sources/serverlessspark/serverlessspark.go","lineNumber":432,"sourceCode":"\t}\n\n\tsessions, err := ToSessions(sessionPbs)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn ListSessionsResponse{Sessions: sessions, NextPageToken: nextPageToken}, nil\n}\n\nfunc (s *Source) GetSession(ctx context.Context, name string) (map[string]any, error) {\n\tclient := s.GetSessionControllerClient()\n\treq := &dataprocpb.GetSessionRequest{\n\t\tName: fmt.Sprintf(\"projects/%s/locations/%s/sessions/%s\", s.GetProject(), s.GetLocation(), name),\n\t}\n\n\tsessionPb, err := client.GetSession(ctx, req)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get session: %w\", err)\n\t}\n\n\tjsonBytes, err := protojson.Marshal(sessionPb)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to marshal session to JSON: %w\", err)\n\t}\n\n\tvar result map[string]any\n\tif err := json.Unmarshal(jsonBytes, &result); err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to unmarshal session JSON: %w\", err)\n\t}\n\n\tconsoleUrl, err := SessionConsoleURLFromProto(sessionPb)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error generating console url: %v\", err)\n\t}\n\tlogsUrl, err := SessionLogsURLFromProto(sessionPb)\n\tif err != nil {","sourceCodeStart":414,"sourceCodeEnd":450,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/sources/serverlessspark/serverlessspark.go#L414-L450","documentation":"The Dataproc GetSession RPC failed for the requested session name — the session likely does not exist under the configured project/location, or the call hit permissions/connectivity issues.","triggerScenarios":"Thrown at internal/sources/serverlessspark/serverlessspark.go:432 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm the session ID exists in the configured project and location","Check IAM permissions and ADC validity","Retry on transient API errors"],"exampleFix":null,"handlingStrategy":"retry","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"}