{"record":{"id":"73b2df0ea53f677e","repo":"jackwener/OpenCLI","slug":"no-xianyu-inbox-conversations-were-found","errorCode":null,"errorMessage":"No Xianyu inbox conversations were found","messagePattern":"No Xianyu inbox conversations were found","errorType":"error_code","errorClass":"EmptyResultError","httpStatus":null,"severity":"info","filePath":"clis/xianyu/inbox.js","lineNumber":58,"sourceCode":"            }\n        }\n        if (!/https:\\/\\/www\\.goofish\\.com\\/im\\b/.test(currentUrl)) {\n            await page.goto(buildInboxUrl());\n        }\n        await page.wait(4);\n        const payload = requireEvaluateObject(await page.evaluate(buildExtractInboxEvaluate(limit)), 'inbox');\n        if (payload?.requiresAuth) {\n            throw new AuthRequiredError('www.goofish.com', 'Xianyu inbox requires a logged-in browser session');\n        }\n        if (payload?.blocked) {\n            throw new AuthRequiredError('www.goofish.com', 'Xianyu inbox is blocked by verification or risk control');\n        }\n        if (!Array.isArray(payload.items)) {\n            throw new CommandExecutionError('Xianyu inbox returned malformed conversation list');\n        }\n        const items = payload.items;\n        if (!items.length) {\n            throw new EmptyResultError('xianyu inbox', 'No Xianyu inbox conversations were found');\n        }\n        let conversations = items.slice(0, limit);\n        if (unreadOnly) {\n            conversations = conversations.filter((item) => Boolean(item.unread));\n        }\n        if (resolveIds) {\n            for (const item of conversations) {\n                if (item.item_id && item.peer_user_id) continue;\n                const rowIndex = Number(item.row_index);\n                if (!Number.isInteger(rowIndex) || rowIndex < 0) continue;\n                requireClickResult(await page.evaluate(buildClickInboxConversationEvaluate(rowIndex)), 'inbox resolve-ids click');\n                await page.wait(1);\n                const current = requireEvaluateObject(await page.evaluate(buildReadCurrentConversationUrlEvaluate()), 'inbox current-url');\n                item.item_id = current?.item_id || item.item_id || '';\n                item.peer_user_id = current?.peer_user_id || item.peer_user_id || '';\n                item.url = current?.url || item.url || '';\n            }\n        }","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/xianyu/inbox.js#L40-L76","documentation":"The `xianyu inbox` command fetches your Xianyu (闲鱼/Goofish) conversation list and throws EmptyResultError when the API responds successfully but `payload.items` is an empty array — i.e. the account genuinely has no inbox conversations. The library distinguishes this from a malformed payload (which throws CommandExecutionError) so callers can treat 'no data' as a distinct EMPTY_RESULT exit code. The hint defaults to 'The page structure may have changed, or you may need to log in'.","triggerScenarios":"Running `xianyu inbox` (with any flags) against an account whose mtop conversation API returns `{ items: [] }`. Note: if `--unread-only` filters everything out, this error is NOT thrown here — it fires only when the raw items list itself is empty before filtering.","commonSituations":"Freshly logged-in or brand-new Xianyu accounts with no buyer/seller messages; a re-registered account whose conversations were cleared; testing against a throwaway account; session cookies pointing at a different account than expected.","solutions":["Confirm the logged-in Xianyu account actually has conversations (open the inbox on www.goofish.com in a browser).","If you expected messages on another account, re-authenticate the browser session with the correct account.","Handle the EMPTY_RESULT exit code / error code in scripts as an expected 'no data' branch rather than retrying.","Drop `--limit` assumptions if any, since the error occurs before slicing/filtering — the source list itself is empty."],"exampleFix":"// before\nawait cli.run(['xianyu', 'inbox']); // crashes with EmptyResultError when items: []\n// after\ntry {\n  const inbox = await cli.run(['xianyu', 'inbox']);\n} catch (err) {\n  if (err.code === 'EMPTY_RESULT') return []; // treat as empty inbox\n  throw err;\n}","handlingStrategy":"try-catch","validationCode":"// No reliable pre-call check; optionally verify account has messages via the web UI.\n// Caller-side: treat EMPTY_RESULT as an expected empty branch.\nconst EMPTY_RESULT = 'EMPTY_RESULT';","typeGuard":"function isEmptyResultError(err) {\n  return err && err.code === 'EMPTY_RESULT';\n}","tryCatchPattern":"try {\n  const inbox = await cli.run(['xianyu', 'inbox']);\n  process(inbox);\n} catch (err) {\n  if (err.code === 'EMPTY_RESULT') {\n    return []; // no conversations — expected state, not a failure\n  }\n  throw err;\n}","preventionTips":["Model empty inboxes as a normal case in your code, not an exception path.","Confirm which goofish.com account the browser profile is logged into before running.","Log err.code and err.hint to distinguish 'no data' from malformed payloads (COMMAND_EXEC)."],"tags":["empty-result","xianyu","inbox","no-data"],"backgroundTag":"empty-result-set","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T17:17:51.833Z"}