{"record":{"id":"00d468ae14f0d49e","repo":"deepseek-ai/deepseek-harness","slug":"web-unsupported-content-type","errorCode":"WEB_UNSUPPORTED_CONTENT_TYPE","errorMessage":"unsupported charset \"${charset}\"","messagePattern":"unsupported charset \"(.+?)\"","errorType":"error_code","errorClass":"WebError","httpStatus":null,"severity":"error","filePath":"packages/web/web-fetch-http/src/policy.ts","lineNumber":103,"sourceCode":"  return match?.[1]?.trim().toLowerCase()\n}\n\n/**\n * Build a `TextDecoder` for the declared charset, falling back to UTF-8 when\n * none is declared. Throws {@link WebError} `WEB_UNSUPPORTED_CONTENT_TYPE` when\n * the label is present but not a charset `TextDecoder` recognizes — better to\n * fail loudly than return mojibake.\n *\n * @param charset - the declared charset label (from {@link parseCharset}), or\n *   `undefined` to default to UTF-8.\n * @returns a decoder for the declared (or defaulted) encoding.\n */\nexport function decoderForCharset(charset: string | undefined): TextDecoder {\n  if (charset === undefined) return new TextDecoder('utf-8')\n  try {\n    return new TextDecoder(charset)\n  } catch (error: unknown) {\n    throw new WebError(`unsupported charset \"${charset}\"`, 'WEB_UNSUPPORTED_CONTENT_TYPE', { cause: error })\n  }\n}\n","sourceCodeStart":85,"sourceCodeEnd":106,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/web/web-fetch-http/src/policy.ts#L85-L106","documentation":"Error \"unsupported charset \"${charset}\"\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/web/web-fetch-http/src/policy.ts:103 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Request a supported charset, or add support for the charset to the policy."],"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"}