{"record":{"id":"11e34d3d5b42044f","repo":"paperclipai/paperclip","slug":"attachment-exceeds-attachmentmaxbytes-bytes","errorCode":null,"errorMessage":"Attachment exceeds ${attachmentMaxBytes} bytes","messagePattern":"Attachment exceeds (.+?) bytes","errorType":"http","errorClass":null,"httpStatus":422,"severity":"error","filePath":"server/src/routes/issues.ts","lineNumber":13666,"sourceCode":"      res.status(403).json({ error: \"Only board users can view feedback trace bundles\" });\n      return;\n    }\n    const bundle = await feedback.getFeedbackTraceBundle(traceId);\n    if (!bundle || !actorCanAccessCompany(req, bundle.companyId)) {\n      res.status(404).json({ error: \"Feedback trace not found\" });\n      return;\n    }\n    res.json(bundle);\n  });\n\n  router.post(\"/issues/:id/comments\", validate(addIssueCommentSchema), async (req, res) => {\n    const id = req.params.id as string;\n    const issue = await getAccessibleResource(req, res, svc.getById(id), \"Issue not found\");\n    if (!issue) return;\n    if (req.actor.type === \"agent\" && req.body.onBehalfOfUserId != null) {\n      await auditAgentIssueCommentAttributionSpoof({\n        db,\n        req,\n        issue,\n        surface: \"issue.comment.create\",\n        requestedValue: readNonEmptyString(req.body.onBehalfOfUserId),\n      });\n      await denyIssueWrite(req, res, issue, \"issue_write_attribution_spoof_rejected\");\n      return;\n    }\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 ??","sourceCodeStart":13648,"sourceCodeEnd":13684,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/routes/issues.ts#L13648-L13684","documentation":"422 from issue attachment upload. Fires when multer rejects the file because its size exceeds the company's attachment limit (attachmentMaxBytes, normalized default); multer's LIMIT_FILE_SIZE is translated into this message.","triggerScenarios":"Thrown at server/src/routes/issues.ts:12647 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"}