{"record":{"id":"f7e8728c5961cc67","repo":"risingwavelabs/risingwave","slug":"file-error-0","errorCode":null,"errorMessage":"File error: {0}","messagePattern":"File error: (.+?)","errorType":"exception","errorClass":"SinkError","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/mod.rs","lineNumber":1182,"sourceCode":"        #[source]\n        #[backtrace]\n        anyhow::Error,\n    ),\n    #[error(\"LanceDB error: {0}\")]\n    LanceDb(\n        #[source]\n        #[backtrace]\n        anyhow::Error,\n    ),\n    #[error(\"ElasticSearch/OpenSearch error: {0}\")]\n    ElasticSearchOpenSearch(\n        #[source]\n        #[backtrace]\n        anyhow::Error,\n    ),\n    #[error(\"Starrocks error: {0}\")]\n    Starrocks(String),\n    #[error(\"File error: {0}\")]\n    File(String),\n    #[error(\"Pulsar error: {0}\")]\n    Pulsar(\n        #[source]\n        #[backtrace]\n        anyhow::Error,\n    ),\n    #[error(transparent)]\n    Internal(\n        #[from]\n        #[backtrace]\n        anyhow::Error,\n    ),\n    #[error(\"BigQuery error: {0}\")]\n    BigQuery(\n        #[source]\n        #[backtrace]\n        anyhow::Error,","sourceCodeStart":1164,"sourceCodeEnd":1200,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/mod.rs#L1164-L1200","documentation":"A SinkError variant carrying a plain String for filesystem sink failures. Raised when writing sink output to local or remote (S3, etc.) files fails — path errors, permission errors, or object-store errors during file creation/writing/commit.","triggerScenarios":"Creating or writing files to the configured file path/URL fails: invalid path format, bucket missing, permissions denied, or unsupported file format/compression option.","commonSituations":"Wrong s3:// prefix or missing trailing path, IAM role lacking PutObject, nonexistent local directory, misspelled file_format option, path is a directory instead of a prefix.","solutions":["Verify the file path/URL format (e.g. s3://bucket/prefix or /local/dir) and that the parent directory/bucket exists.","Check credentials/permissions for the target storage (S3 IAM, local FS permissions).","Validate file_format and path options against supported values.","Rerun after fixing; if transient object-store errors, retry the sink."],"exampleFix":"// before\nWITH (connector='file', file_path='s3://mybucket') // missing prefix path\n// after\nWITH (connector='file', file_path='s3://mybucket/output/', file_format='parquet')","handlingStrategy":"validation","validationCode":"aws s3 ls s3://mybucket/output/ || mkdir -p /local/dir # ensure destination exists and is writable","typeGuard":null,"tryCatchPattern":"if let SinkError::File(msg) = err { log::error!(\"file sink: {msg}\"); /* fix path/permissions before restarting sink */ }","preventionTips":["Validate the path/URL format and existence before CREATE SINK","Grant the storage principal PutObject/FS write permissions","Use a trailing prefix path, not a bare bucket or an existing file path"],"tags":["sink","file","s3","filesystem"],"backgroundTag":"file-write-failed","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}