{"record":{"id":"6d87f401f8a38dce","repo":"risingwavelabs/risingwave","slug":"catalog-error-0","errorCode":null,"errorMessage":"Catalog error: {0}","messagePattern":"Catalog error: (.+?)","errorType":"error_code","errorClass":"ErrorCode","httpStatus":null,"severity":"error","filePath":"src/frontend/src/error.rs","lineNumber":134,"sourceCode":"    // TODO: use a new type for bind error\n    // TODO(error-handling): should prefer use error types than strings.\n    #[error(\"Bind error: {0}\")]\n    BindError(#[message] String),\n    // TODO: only keep this one\n    #[error(\"Failed to bind expression: {expr}: {error}\")]\n    BindErrorRoot {\n        expr: String,\n        #[source]\n        #[backtrace]\n        error: BoxedError,\n    },\n    #[error(transparent)]\n    CastError(\n        #[from]\n        #[backtrace]\n        CastError,\n    ),\n    #[error(\"Catalog error: {0}\")]\n    CatalogError(\n        #[source]\n        #[backtrace]\n        #[message]\n        BoxedError,\n    ),\n    #[error(\"Protocol error: {0}\")]\n    ProtocolError(#[message] String),\n    #[error(\"Scheduler error: {0}\")]\n    SchedulerError(\n        #[source]\n        #[backtrace]\n        BoxedError,\n    ),\n    #[error(\"Task not found\")]\n    TaskNotFound,\n    #[error(\"Session not found\")]\n    SessionNotFound,","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/frontend/src/error.rs#L116-L152","documentation":"This is RisingWave frontend's ErrorCode::CatalogError variant, surfaced as \"Catalog error: {0}\". It wraps any catalog-related BoxedError produced while resolving or mutating catalog objects (tables, materialized views, sinks, users, schemas) during SQL planning and DDL execution. It is raised via From<CatalogError> and at binder sites like table_or_source.rs when the referenced catalog item cannot be found or is invalid.","triggerScenarios":"Referencing a non-existent table/view/sink/schema in a query or DDL; FROM-clause binding fails to resolve a relation (src/frontend/src/binder/relation/table_or_source.rs:391); catalog lookups during ALTER OWNER, ALTER SET SCHEMA, or DECLARE CURSOR; converting a catalog::CatalogError into ErrorCode via src/frontend/src/catalog/mod.rs:194.","commonSituations":"Typo in table or schema name; connecting to a different database than expected so the object does not exist; object dropped by another session concurrently; running DDL against the wrong cluster; case-sensitivity mistakes with quoted identifiers.","solutions":["Verify the object exists with SHOW TABLES / SHOW MATERIALIZED VIEWS / SHOW SCHEMAS and check the identifier spelling and case.","Confirm you are connected to the intended database and search_path (\\conninfo, SHOW search_path).","If the object was recently created in another session/transaction, ensure the creation committed before querying.","Recreate the missing object or adjust the SQL to reference an existing one."],"exampleFix":"// before\nSELECT * FROM reuslts;\n// after\nSELECT * FROM results; -- check SHOW TABLES for exact name","handlingStrategy":"try-catch","validationCode":"-- before running DDL/query\nSHOW TABLES; -- confirm object exists\nSHOW SCHEMAS;","typeGuard":null,"tryCatchPattern":"match res {\n    Err(e) if e.to_string().starts_with(\"Catalog error\") => eprintln!(\"object missing: {e}\"),\n    r => r.expect(\"query failed\"),\n}","preventionTips":["Use schema-qualified, correctly-cased identifiers in all SQL.","Run existence checks (SHOW/INFORMATION_SCHEMA) before DDL that assumes an object.","Keep migrations idempotent (CREATE TABLE IF NOT EXISTS / DROP IF EXISTS)."],"tags":["database","catalog","risingwave","sql"],"backgroundTag":"entity-not-found","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}