{"record":{"id":"24a3abee83a3698f","repo":"oven-sh/bun","slug":"writefailed","errorCode":null,"errorMessage":"WriteFailed","messagePattern":"WriteFailed","errorType":"error_code","errorClass":"bun_core::Error","httpStatus":null,"severity":"error","filePath":"src/bun_core/error.rs","lineNumber":26,"sourceCode":"    FmtError,\n    #[error(\"Unexpected\")]\n    Unexpected,\n    #[error(\"InvalidByteSequence\")]\n    InvalidByteSequence,\n    #[error(\"StringTooLong\")]\n    StringTooLong,\n    #[error(\"InvalidCharacter\")]\n    InvalidCharacter,\n    // errno-category names kept local (bun_core cannot depend on bun_errno):\n    #[error(\"NoSpaceLeft\")]\n    NoSpaceLeft,\n    #[error(\"NameTooLong\")]\n    NameTooLong,\n    #[error(\"FileNotFound\")]\n    FileNotFound,\n    #[error(\"AccessDenied\")]\n    AccessDenied,\n    #[error(\"WriteFailed\")]\n    WriteFailed,\n    #[error(\"CurrentWorkingDirectoryUnlinked\")]\n    CurrentWorkingDirectoryUnlinked,\n    #[error(transparent)]\n    Alloc(#[from] bun_alloc::AllocError),\n}\n\nimpl Error {\n    #[allow(clippy::trivially_copy_pass_by_ref)]\n    pub fn name(&self) -> &'static str {\n        match self {\n            Self::EndOfStream => \"EndOfStream\",\n            Self::StreamTooLong => \"StreamTooLong\",\n            Self::FmtError => \"FmtError\",\n            Self::Unexpected => \"Unexpected\",\n            Self::InvalidByteSequence => \"InvalidByteSequence\",\n            Self::StringTooLong => \"StringTooLong\",\n            Self::InvalidCharacter => \"InvalidCharacter\",","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/src/bun_core/error.rs#L8-L44","documentation":"Sentinel variant of the bun_core Error enum: a write syscall (or write-like operation) failed outright (e.g. EIO, EBADF) without a more specific local variant. Generic write-failure guard; the underlying errno, if any, is not embedded in the message.","triggerScenarios":"Thrown at src/bun_core/error.rs:26 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the underlying errno for the real cause","Check whether the target fd/pipe is still open"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","contentChangedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}