{"record":{"id":"69bda2535c9885b3","repo":"jackwener/OpenCLI","slug":"jike-user-returned-an-unreadable-payload","errorCode":null,"errorMessage":"Jike user returned an unreadable payload","messagePattern":"Jike user returned an unreadable payload","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/jike/user.js","lineNumber":63,"sourceCode":"                throw new EmptyResultError('jike user', `No posts were returned for user ${args.username}. Confirm the username and login state.`);\n            }\n            return data.slice(0, limit).map((item) => ({\n                id: item.id ?? '',\n                content: item.content ?? '',\n                type: item.type ?? '',\n                likes: item.likes ?? 0,\n                comments: item.comments ?? 0,\n                time: item.time ?? '',\n                url: `https://web.okjike.com/originalPost/${item.id ?? ''}`,\n            }));\n        }\n        if (data?.reason === 'missing-data-script') {\n            throw new CommandExecutionError('Jike user page did not expose the expected data script');\n        }\n        if (data?.reason === 'parse-error') {\n            throw new CommandExecutionError(`Failed to parse Jike user data: ${data.message || 'unknown error'}`);\n        }\n        throw new CommandExecutionError('Jike user returned an unreadable payload');\n    },\n});\n","sourceCodeStart":45,"sourceCodeEnd":66,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/jike/user.js#L45-L66","documentation":"Catch-all CommandExecutionError thrown when the Jike user extraction returns a payload that matches none of the handled shapes: not an array, not 'missing-data-script', and not 'parse-error'. It guards against unexpected or future payload variants so the CLI fails loudly rather than silently misbehaving.","triggerScenarios":"Executing `jike user` when page.evaluate returns null/undefined (script crashed before returning), or a payload object with an unrecognized 'reason' or structure not anticipated by the command.","commonSituations":"Browser crashed or navigated away mid-evaluate yielding null; a proxy stripped the response; a new Jike response variant not yet handled by the CLI version.","solutions":["Retry the command to rule out a transient null evaluate result","Ensure the page is not navigating or closing while the command runs","Update the CLI to the latest version to cover new payload shapes","File an issue including the payload if it persists on the latest version"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const posts = await jikeUser({ username, limit });\n} catch (e) {\n  if (String(e.message).includes('unreadable payload')) {\n    console.error('Unexpected payload; retry or report with details');\n  } else throw e;\n}","preventionTips":["Don't navigate away or close the browser while the command runs","Retry transient null-evaluate failures before escalating","Keep automation library (Playwright/Puppeteer) versions aligned with the CLI","Report persistent occurrences with the command output"],"tags":["scraping","unexpected-payload","defensive"],"backgroundTag":"unexpected-response-shape","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}