{"record":{"id":"e45c759cf68dcc29","repo":"paperclipai/paperclip","slug":"object-not-found","errorCode":null,"errorMessage":"Object not found.","messagePattern":"Object not found\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/src/commands/worktree.ts","lineNumber":352,"sourceCode":"  const parts = normalized.split(\"/\").filter((part) => part.length > 0);\n  if (parts.length === 0 || parts.some((part) => part === \".\" || part === \"..\")) {\n    throw new Error(\"Invalid object key.\");\n  }\n  return parts.join(\"/\");\n}\n\nfunction resolveLocalStoragePath(baseDir: string, objectKey: string): string {\n  const resolved = path.resolve(baseDir, normalizeStorageObjectKey(objectKey));\n  const root = path.resolve(baseDir);\n  if (resolved !== root && !resolved.startsWith(`${root}${path.sep}`)) {\n    throw new Error(\"Invalid object key path.\");\n  }\n  return resolved;\n}\n\nasync function s3BodyToBuffer(body: unknown): Promise<Buffer> {\n  if (!body) {\n    throw new Error(\"Object not found.\");\n  }\n  if (Buffer.isBuffer(body)) {\n    return body;\n  }\n  if (body instanceof Readable) {\n    return await streamToBuffer(body);\n  }\n\n  const candidate = body as {\n    transformToWebStream?: () => ReadableStream<Uint8Array>;\n    arrayBuffer?: () => Promise<ArrayBuffer>;\n  };\n  if (typeof candidate.transformToWebStream === \"function\") {\n    const webStream = candidate.transformToWebStream();\n    const reader = webStream.getReader();\n    const chunks: Uint8Array[] = [];\n    while (true) {\n      const { done, value } = await reader.read();","sourceCodeStart":334,"sourceCodeEnd":370,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/cli/src/commands/worktree.ts#L334-L370","documentation":"Lookup-miss sentinel in the worktree storage read path: the requested object key had no readable body in the configured storage backend, used by callers (e.g. attachment lookup) to detect and skip objects that were never uploaded or have been removed.","triggerScenarios":"Thrown at cli/src/commands/worktree.ts:319 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the object key exists; list objects for the worktree first."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}