{"record":{"id":"86f6e24d8e549441","repo":"paperclipai/paperclip","slug":"invalid-attachment-metadata","errorCode":null,"errorMessage":"Invalid attachment metadata","messagePattern":"Invalid attachment metadata","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"server/src/routes/issues.ts","lineNumber":13691,"sourceCode":"    }\n    const commentAccessDecision = await assertAgentIssueCommentAllowed(req, res, issue);\n    if (!commentAccessDecision) return;\n    const commentAuthorizationReason = issueWriteAuthorizationReason(req, commentAccessDecision);\n    if (!assertStructuredCommentFieldsAllowed(req, res, {\n      presentation: req.body.presentation,\n      metadata: req.body.metadata,\n    })) return;\n    const closedExecutionWorkspace = await getClosedIssueExecutionWorkspace(issue);\n\n    const actor = getActorInfo(req);\n    const commentPresentation = req.body.presentation ??\n      await deriveRecoveryCommentPresentation(req, issue.companyId, req.body.body);\n    const reopenRequested = req.body.reopen === true;\n    const resumeRequested = req.body.resume === true;\n    const interruptRequested = req.body.interrupt === true;\n    const isClosed = isClosedIssueStatus(issue.status);\n    const isBlocked = issue.status === \"blocked\";\n    const crossIssueCommentOnlyGrant =\n      isClosed &&\n      (isDirectParentReportDecision(commentAccessDecision) ||\n        (req.actor.type === \"agent\" &&\n          issue.assigneeAgentId !== null &&\n          issue.assigneeAgentId !== req.actor.agentId &&\n          !reopenRequested &&\n          !resumeRequested &&\n          (isIssueMentionGrantDecision(commentAccessDecision) ||\n            isDefaultOpenIssueWriteDecision(commentAccessDecision))));\n    const effectiveReopenRequested = crossIssueCommentOnlyGrant ? false : reopenRequested;\n    const effectiveResumeRequested = crossIssueCommentOnlyGrant ? false : resumeRequested;\n    if (\n      isClosed &&\n      req.actor.type === \"agent\" &&\n      issue.assigneeAgentId !== null &&\n      issue.assigneeAgentId !== req.actor.agentId &&\n      !crossIssueCommentOnlyGrant\n    ) {","sourceCodeStart":13673,"sourceCodeEnd":13709,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/routes/issues.ts#L13673-L13709","documentation":"422 from issue attachment upload. Fires when createIssueAttachmentMetadataSchema.safeParse fails on req.body — the accompanying metadata fields (title/filename/kind etc.) do not conform to the attachment metadata schema.","triggerScenarios":"Thrown at server/src/routes/issues.ts:12672 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the offending parameter to satisfy the constraint stated in the error message (type, range, or allowed values), then retry.","Refer to the route's request validation in the named file and the shared validators for the accepted format."],"exampleFix":null,"handlingStrategy":"validation","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-14T05:17:10.506Z"}