{"record":{"id":"dbe6b6da6ee86992","repo":"risingwavelabs/risingwave","slug":"can-t-find-data","errorCode":null,"errorMessage":"Can't find data","messagePattern":"Can't find data","errorType":"exception","errorClass":"SinkError","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/doris.rs","lineNumber":518,"sourceCode":"            .header(\n                \"Authorization\",\n                format!(\n                    \"Basic {}\",\n                    general_purpose::STANDARD.encode(format!(\"{}:{}\", self.user, self.password))\n                ),\n            )\n            .send()\n            .await\n            .map_err(|err| SinkError::DorisStarrocksConnect(err.into()))?;\n\n        let json: Value = response\n            .json()\n            .await\n            .map_err(|err| SinkError::DorisStarrocksConnect(err.into()))?;\n        let json_data = if json.get(\"code\").is_some() && json.get(\"msg\").is_some() {\n            json.get(\"data\")\n                .ok_or_else(|| {\n                    SinkError::DorisStarrocksConnect(anyhow::anyhow!(\"Can't find data\"))\n                })?\n                .clone()\n        } else {\n            json\n        };\n        let schema: DorisSchema = serde_json::from_value(json_data)\n            .context(\"Can't get schema from json\")\n            .map_err(SinkError::DorisStarrocksConnect)?;\n        Ok(schema)\n    }\n}\n#[derive(Debug, Serialize, Deserialize)]\npub struct DorisSchema {\n    status: i32,\n    #[serde(rename = \"keysType\")]\n    pub keys_type: String,\n    pub properties: Vec<DorisField>,\n}","sourceCodeStart":500,"sourceCodeEnd":536,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/doris.rs#L500-L536","documentation":"get_schema_from_doris parses the FE schema JSON response; when the response carries `code` and `msg` fields (an error-style envelope), it expects a `data` field containing the schema. If `data` is missing, this error is raised, meaning Doris returned an error response without the expected payload.","triggerScenarios":"Calling get_schema_from_doris against a Doris FE that returns a JSON envelope with code/msg but no `data` key, e.g. because the database/table does not exist or the FE rejects the request.","commonSituations":"Wrong `database` or `table` names in the sink config; insufficient Doris user permissions; Doris FE version returning a differently shaped error body; network proxy stripping the data field.","solutions":["Verify the `database` and `table` options exist in Doris and are spelled correctly.","Check Doris FE logs for the underlying error (code/msg in the response body).","Confirm the sink user has SELECT privilege on the target table.","Capture the full HTTP response (curl the FE endpoint) to inspect the envelope shape."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// verify target exists before creating the sink\n// curl -u user:pass http://fe-host:8030/api/show_meta_info?db=mydb&table=mytable","typeGuard":"fn has_data_field(v: &serde_json::Value) -> bool {\n    v.get(\"code\").is_some() && v.get(\"msg\").is_some() && v.get(\"data\").is_some()\n}","tryCatchPattern":"match client.get_schema_from_doris().await {\n    Err(SinkError::DorisStarrocksConnect(e)) if e.to_string().contains(\"Can't find data\") => {\n        eprintln!(\"check db/table names and Doris permissions: {e}\");\n    }\n    other => other?,\n}","preventionTips":["Verify database and table names exist in Doris before creating the sink.","Grant the sink user SELECT privilege on the target table.","Check FE logs whenever schema fetch fails to see the code/msg envelope."],"tags":["rust","sink","doris","http","schema"],"backgroundTag":"unexpected-response-shape","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"}