{"record":{"id":"73f054ea0eb1e4fe","repo":"paperclipai/paperclip","slug":"unable-to-load-attachment-preview-response-stat","errorCode":null,"errorMessage":"Unable to load attachment preview (${response.status})","messagePattern":"Unable to load attachment preview \\((.+?)\\)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"ui/src/components/IssueAttachmentsSection.tsx","lineNumber":42,"sourceCode":"  attachments: IssueAttachment[];\n  uploadButton?: ReactNode;\n  error?: string | null;\n  dragActive?: boolean;\n  deletePending?: boolean;\n  onDelete?: (attachmentId: string) => void;\n  onImageClick: (attachment: IssueAttachment) => void;\n  onDragEnter?: (evt: DragEvent<HTMLDivElement>) => void;\n  onDragOver?: (evt: DragEvent<HTMLDivElement>) => void;\n  onDragLeave?: (evt: DragEvent<HTMLDivElement>) => void;\n  onDrop?: (evt: DragEvent<HTMLDivElement>) => void;\n}\n\nasync function fetchAttachmentText(attachment: IssueAttachment) {\n  const response = await fetch(attachment.contentPath, {\n    headers: { Accept: \"text/markdown,text/plain;q=0.9,*/*;q=0.1\" },\n  });\n  if (!response.ok) {\n    throw new Error(`Unable to load attachment preview (${response.status})`);\n  }\n  return response.text();\n}\n\nfunction AttachmentActions({\n  attachment,\n  onDelete,\n  deletePending,\n  onPreview,\n}: {\n  attachment: IssueAttachment;\n  onDelete?: (attachmentId: string) => void;\n  deletePending?: boolean;\n  onPreview?: (attachment: IssueAttachment) => void;\n}) {\n  const filename = attachmentFilename(attachment);\n  return (\n    <div className=\"flex shrink-0 items-center gap-1\">","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/ui/src/components/IssueAttachmentsSection.tsx#L24-L60","documentation":"Error \"Unable to load attachment preview (${response.status})\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at ui/src/components/IssueAttachmentsSection.tsx:42 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry loading the preview; re-authenticate if the status is 401/403, or check that the attachment still exists."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}