{"record":{"id":"c3484873565339bd","repo":"deepseek-ai/deepseek-harness","slug":"reading-the-value-threw-renderthrown-error","errorCode":null,"errorMessage":"reading the value threw: ${renderThrown(error)}","messagePattern":"reading the value threw: (.+?)","errorType":"exception","errorClass":"MaterializeError","httpStatus":null,"severity":"error","filePath":"packages/workflow/workflow-worker-thread/src/realm.ts","lineNumber":74,"sourceCode":" * returned unchanged; nested `undefined` and values JSON cannot represent losslessly fail\n * with the offending path. Property accessors run normally, and a throwing read is wrapped\n * with its rendered failure.\n *\n * @param value - the realm value to materialize.\n * @param root - the path label for the root value (error messages).\n * @returns the host-realm copy (plain objects/arrays/scalars only).\n * @throws {@link MaterializeError} for unsupported values, cycles, sparse arrays, exotic\n *   prototypes, or property reads that throw.\n */\nexport function materializeFromRealm(value: unknown, root = 'value'): unknown {\n  if (value === undefined) return undefined\n  try {\n    return materialize(value, root, new Set())\n  } catch (error: unknown) {\n    if (error instanceof MaterializeError) throw error\n    // A property read ran script code that threw; total-ize it so callers can\n    // keep the narrow MaterializeError contract.\n    throw new MaterializeError(root, `reading the value threw: ${renderThrown(error)}`)\n  }\n}\n\nfunction materialize(value: unknown, path: string, seen: Set<object>): unknown {\n  switch (typeof value) {\n    case 'boolean':\n    case 'string':\n      return value\n    case 'number': {\n      if (!Number.isFinite(value)) throw new MaterializeError(path, 'non-finite numbers are not JSON data')\n      return value\n    }\n    case 'bigint':\n      throw new MaterializeError(path, 'bigints are not JSON data')\n    case 'function':\n      throw new MaterializeError(path, 'functions are not plain JSON data')\n    case 'symbol':\n      throw new MaterializeError(path, 'symbols are not plain JSON data')","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/workflow/workflow-worker-thread/src/realm.ts#L56-L92","documentation":"Error \"reading the value threw: ${renderThrown(error)}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/workflow/workflow-worker-thread/src/realm.ts:74 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove throwing getters or proxies from the returned value; materialize plain data before returning it from the workflow."],"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"}