{"record":{"id":"9e8147da86f3c473","repo":"deepseek-ai/deepseek-harness","slug":"image-too-large-9e8147","errorCode":"IMAGE_TOO_LARGE","errorMessage":"Image exceeds the configured byte limit.","messagePattern":"Image exceeds the configured byte limit\\.","errorType":"exception","errorClass":"AttachmentError","httpStatus":null,"severity":"error","filePath":"packages/attachment/attachment-local/src/store.ts","lineNumber":98,"sourceCode":"  data: Uint8Array\n  /** Durable reference describing {@link data}. */\n  ref: ImageAttachmentRef\n}\n\n/**\n * Decode, normalize, and verify one submitted image without touching storage.\n * @param input - submitted encoded bytes and declared media type.\n * @param limits - source admission policy.\n * @param policy - independent normalization policy.\n * @returns immutable reference facts beside bytes ready for atomic publication.\n */\nexport async function prepareImageFile(\n  input: SaveImageAttachment,\n  limits: ImageAttachmentLimits,\n  policy: NormalizationPolicy,\n): Promise<PreparedImageFile> {\n  if (input.data.byteLength > limits.maxImageBytes) {\n    throw new AttachmentError('Image exceeds the configured byte limit.', 'IMAGE_TOO_LARGE')\n  }\n  const detected = await inspectMetadata(input.data, input.mediaType, limits)\n  const normalized = await normalizeImage(input.data, detected, policy)\n  const sha256 = digest(normalized.data)\n  const name = displayName(input.name)\n  const downscaled = detected.width !== normalized.width || detected.height !== normalized.height\n  return {\n    data: normalized.data,\n    ref: {\n      attachmentId: AttachmentId(`sha256:${sha256}`),\n      mediaType: normalized.mediaType,\n      width: normalized.width,\n      height: normalized.height,\n      bytes: normalized.data.byteLength,\n      ...(name !== undefined ? { name } : {}),\n      ...downscaled ? { originalDimensions: { width: detected.width, height: detected.height } } : {},\n    },\n  }","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/attachment/attachment-local/src/store.ts#L80-L116","documentation":"Error \"Image exceeds the configured byte limit.\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/attachment/attachment-local/src/store.ts:98 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Shrink the image or raise the configured byte limit."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}