{"record":{"id":"b5459863596f810b","repo":"PaddlePaddle/PaddleOCR","slug":"document-parsing-result-page-is-missing-markdown-t","errorCode":null,"errorMessage":"Document parsing result page is missing markdown.text.","messagePattern":"Document parsing result page is missing markdown\\.text\\.","errorType":"exception","errorClass":"ResultParseError","httpStatus":null,"severity":"warning","filePath":"api_sdk/typescript/src/client.ts","lineNumber":312,"sourceCode":"          raw: item,\n        };\n      });\n    });\n    return { jobId, pages, dataInfo };\n  }\n\n  private parseDocParsingResult(jobId: string, jsonlData: unknown[]): DocParsingResult {\n    const dataInfo: Record<string, unknown> = {};\n    const pages = jsonlData.flatMap((lineObj) => {\n      if (!isRecord(lineObj) || !isRecord(lineObj.result) || !Array.isArray(lineObj.result.layoutParsingResults)) {\n        throw new ResultParseError(\"Document parsing result item is missing result.layoutParsingResults.\");\n      }\n      if (isRecord(lineObj.result.dataInfo)) {\n        Object.assign(dataInfo, lineObj.result.dataInfo);\n      }\n      return lineObj.result.layoutParsingResults.map((item) => {\n        if (!isRecord(item) || !isRecord(item.markdown) || typeof item.markdown.text !== \"string\") {\n          throw new ResultParseError(\"Document parsing result page is missing markdown.text.\");\n        }\n        return {\n          markdownText: item.markdown.text,\n          markdownImages: isRecord(item.markdown.images) ? stringMap(item.markdown.images) : {},\n          outputImages: isRecord(item.outputImages) ? stringMap(item.outputImages) : {},\n          prunedResult: item.prunedResult,\n          inputImageUrl: typeof item.inputImage === \"string\" ? item.inputImage : undefined,\n          exports: isRecord(item.exports) ? item.exports : {},\n          markdown: item.markdown,\n          raw: item,\n        };\n      });\n    });\n    return { jobId, pages, dataInfo };\n  }\n\n  private resolveJob(job: Job | string, expectedTask: Job[\"task\"]): Job {\n    if (typeof job === \"string\") {","sourceCodeStart":294,"sourceCodeEnd":330,"githubUrl":"https://github.com/PaddlePaddle/PaddleOCR/blob/2661c7c0ef5c613e8f93c6e93b2e052399f0f854/api_sdk/typescript/src/client.ts#L294-L330","documentation":"Raised as NetworkError from get_job_status in paddleocr/_api_client/_http.py:168 when the GET for a job's status fails at the connection layer (DNS, TLS, reset, refused). The job keeps running server-side; only the observation request failed. Transient by nature — retrying the same status call is safe and idempotent.","triggerScenarios":"Polling get_job_status during a network blip, VPN reconnect, DNS hiccup, or when a proxy drops idle keepalive connections between polls.","commonSituations":"Long-running jobs polled for minutes over unreliable networks; laptop sleep/resume mid-poll; container DNS flakiness; proxies closing idle sessions.","solutions":["Retry the status call with a small backoff — read-only and idempotent","If keepalive resets recur between long poll intervals, retry transparently or use a fresh session","Verify general connectivity if failures persist","Keep the jobId persisted so polling can resume after process restarts"],"exampleFix":"# backoff retry for idempotent status reads\nimport time\nfrom paddleocr._api_client.errors import NetworkError\nfor delay in (1, 2, 4, 8):\n    try:\n        status = client.get_job_status(job_id)\n        break\n    except NetworkError:\n        time.sleep(delay)\nelse:\n    raise","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"from paddleocr._api_client.errors import NetworkError\nfor delay in (1, 2, 4, 8):\n    try:\n        status = client.get_job_status(job_id)\n        return\n    except NetworkError:\n        time.sleep(delay)\nraise","preventionTips":["Retry idempotent status reads with backoff instead of failing the whole job flow","Persist jobId so polling resumes after connectivity recovers","Expect keepalive resets on long poll sessions and handle them"],"tags":["network","connection","polling","retryable"],"backgroundTag":null,"analyzedSha":"2661c7c0ef5c613e8f93c6e93b2e052399f0f854","analyzedAt":"2026-08-14T20:17:30.180Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}