{"record":{"id":"17e4d09bccca2389","repo":"oven-sh/bun","slug":"stringtoolong","errorCode":null,"errorMessage":"StringTooLong","messagePattern":"StringTooLong","errorType":"error_code","errorClass":"bun_core::Error","httpStatus":null,"severity":"error","filePath":"src/bun_core/error.rs","lineNumber":13,"sourceCode":"#[derive(Debug, Clone, Copy, PartialEq, Eq, thiserror::Error)]\npub enum Error {\n    #[error(\"EndOfStream\")]\n    EndOfStream,\n    #[error(\"StreamTooLong\")]\n    StreamTooLong,\n    #[error(\"FmtError\")]\n    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),","sourceCodeStart":1,"sourceCodeEnd":31,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/src/bun_core/error.rs#L1-L31","documentation":"Sentinel variant of the bun_core generic Error enum: a string being parsed or built exceeds the length limit imposed at that call site (distinct from StreamTooLong, which bounds streams/buffers). Consumers match on the enum variant; the message carries no length details.","triggerScenarios":"Thrown at src/bun_core/error.rs:13 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Split the input below the length limit","Reject oversized strings at the API boundary"],"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"}