paperclipai/paperclip · error · Error

Unable to load attachment preview (${response.status})

Error message

Unable to load attachment preview (${response.status})

What it means

Error "Unable to load attachment preview (${response.status})" thrown in paperclipai/paperclip.

Source

Thrown at ui/src/components/IssueAttachmentsSection.tsx:42

  attachments: IssueAttachment[];
  uploadButton?: ReactNode;
  error?: string | null;
  dragActive?: boolean;
  deletePending?: boolean;
  onDelete?: (attachmentId: string) => void;
  onImageClick: (attachment: IssueAttachment) => void;
  onDragEnter?: (evt: DragEvent<HTMLDivElement>) => void;
  onDragOver?: (evt: DragEvent<HTMLDivElement>) => void;
  onDragLeave?: (evt: DragEvent<HTMLDivElement>) => void;
  onDrop?: (evt: DragEvent<HTMLDivElement>) => void;
}

async function fetchAttachmentText(attachment: IssueAttachment) {
  const response = await fetch(attachment.contentPath, {
    headers: { Accept: "text/markdown,text/plain;q=0.9,*/*;q=0.1" },
  });
  if (!response.ok) {
    throw new Error(`Unable to load attachment preview (${response.status})`);
  }
  return response.text();
}

function AttachmentActions({
  attachment,
  onDelete,
  deletePending,
  onPreview,
}: {
  attachment: IssueAttachment;
  onDelete?: (attachmentId: string) => void;
  deletePending?: boolean;
  onPreview?: (attachment: IssueAttachment) => void;
}) {
  const filename = attachmentFilename(attachment);
  return (
    <div className="flex shrink-0 items-center gap-1">

View on GitHub (pinned to 120ae5428f)

Solutions

  1. Retry loading the preview; re-authenticate if the status is 401/403, or check that the attachment still exists.

When it happens

Trigger: Thrown at ui/src/components/IssueAttachmentsSection.tsx:42 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18). Data as JSON: /api/errors/73f054ea0eb1e4fe. Report an issue: GitHub.