{"record":{"id":"513f245005d920b9","repo":"cube-js/cube","slug":"unknown-metadata-operation-operation","errorCode":null,"errorMessage":"Unknown metadata operation: ${operation}","messagePattern":"Unknown metadata operation: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cubejs-query-orchestrator/src/orchestrator/QueryCache.ts","lineNumber":778,"sourceCode":"            case MetadataOperationType.GET_SCHEMAS:\n              queue.logger('Getting datasource schemas', { dataSource: req.dataSource, requestId: req.requestId });\n              return client.getSchemas();\n            case MetadataOperationType.GET_TABLES_FOR_SCHEMAS:\n              queue.logger('Getting tables for schemas', {\n                dataSource: req.dataSource,\n                schemaCount: params.schemas?.length || 0,\n                requestId: req.requestId\n              });\n              return client.getTablesForSpecificSchemas(params.schemas);\n            case MetadataOperationType.GET_COLUMNS_FOR_TABLES:\n              queue.logger('Getting columns for tables', {\n                dataSource: req.dataSource,\n                tableCount: params.tables?.length || 0,\n                requestId: req.requestId\n              });\n              return client.getColumnsForSpecificTables(params.tables);\n            default:\n              throw new Error(`Unknown metadata operation: ${operation}`);\n          }\n        },\n        query: async (req, setCancelHandle) => {\n          const client = await clientFactory();\n\n          const resultPromise = executeFn(client, req);\n          let handle;\n          if (resultPromise.cancel) {\n            queue.cancelHandlerCounter += 1;\n            handle = queue.cancelHandlerCounter;\n            queue.handles[handle] = resultPromise;\n            await setCancelHandle(handle);\n          }\n          const result = await resultPromise;\n          if (handle) {\n            delete queue.handles[handle];\n          }\n          return result;","sourceCodeStart":760,"sourceCodeEnd":796,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-query-orchestrator/src/orchestrator/QueryCache.ts#L760-L796","documentation":"A dispatch guard in the metadata-operation queue handler (createQueue): a switch over MetadataOperationType received an operation value with no matching case (expected GET_SCHEMAS, GET_TABLES_FOR_SCHEMAS, etc.). It indicates an internal protocol mismatch — a request was queued with an operation type this orchestrator version doesn't implement. The input at fault is the unrecognized `operation` field of the metadata request.","triggerScenarios":"Thrown at packages/cubejs-query-orchestrator/src/orchestrator/QueryCache.ts:778 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the metadata operation name sent by the client matches a value of the MetadataOperationType enum","Upgrade the client and server to matching versions — a newer client may send an operation code an older orchestrator does not know","Extend MetadataOperationType and add a matching case if a genuinely new operation is required"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}