{"record":{"id":"3e8d894bf3138579","repo":"paperclipai/paperclip","slug":"unsupported-image-type-contenttype-unknown","errorCode":null,"errorMessage":"Unsupported image type: ${contentType || \"unknown\"}","messagePattern":"Unsupported image type: (.+?)","errorType":"http","errorClass":null,"httpStatus":422,"severity":"error","filePath":"server/src/routes/assets.ts","lineNumber":241,"sourceCode":"\n  router.post(\"/companies/:companyId/logo\", async (req, res) => {\n    const companyId = req.params.companyId as string;\n    assertCompanyAccess(req, companyId);\n\n    try {\n      await runSingleFileUpload(companyLogoUpload, req, res);\n    } catch (err) {\n      if (err instanceof multer.MulterError) {\n        if (err.code === \"LIMIT_FILE_SIZE\") {\n          res.status(422).json({\n            error: `Image is larger than the ${formatAttachmentSize(MAX_ATTACHMENT_BYTES)} limit`,\n          });\n          return;\n        }\n        res.status(400).json({ error: err.message });\n        return;\n      }\n      throw err;\n    }\n\n    const file = (req as Request & { file?: { mimetype: string; buffer: Buffer; originalname: string } }).file;\n    if (!file) {\n      res.status(400).json({ error: \"Missing file field 'file'\" });\n      return;\n    }\n\n    const contentType = (file.mimetype || \"\").toLowerCase();\n    if (!ALLOWED_COMPANY_LOGO_CONTENT_TYPES.has(contentType)) {\n      res.status(422).json({ error: `Unsupported image type: ${contentType || \"unknown\"}` });\n      return;\n    }\n\n    let fileBody = file.buffer;\n    if (contentType === SVG_CONTENT_TYPE) {\n      const sanitized = sanitizeSvgBuffer(file.buffer);\n      if (!sanitized || sanitized.length <= 0) {","sourceCodeStart":223,"sourceCodeEnd":259,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/routes/assets.ts#L223-L259","documentation":"Error \"Unsupported image type: ${contentType || \"unknown\"}\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at server/src/routes/assets.ts:240 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Upload an image with a supported content type (e.g. PNG, JPEG)."],"exampleFix":null,"handlingStrategy":null,"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"}