{"record":{"id":"61ec6e5b99883557","repo":"jackwener/OpenCLI","slug":"weibo-publish-failed","errorCode":null,"errorMessage":"Weibo publish failed","messagePattern":"Weibo publish failed","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/weibo/publish.js","lineNumber":292,"sourceCode":"                        }\n                        for (const m of errorMarkers) {\n                            if (txt.includes(m)) {\n                                return { ok: false, message: txt };\n                            }\n                        }\n                    }\n                    return null;\n                })()\n            `);\n            if (finalResult !== null) break;\n        }\n\n        if (!finalResult) {\n            throw new CommandExecutionError('Publish button clicked but result was unclear. Check Weibo manually.');\n        }\n\n        if (!finalResult.ok) {\n            throw new CommandExecutionError(finalResult.message || 'Weibo publish failed');\n        }\n\n        return [{\n            status: 'success',\n            message: finalResult.message || 'Published successfully',\n            text,\n        }];\n    },\n});\n\nexport const __test__ = {\n    validateText,\n    validateImagePaths,\n};\n","sourceCodeStart":274,"sourceCodeEnd":307,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/weibo/publish.js#L274-L307","documentation":"Thrown when the result poll did get a verdict but it reported failure: finalResult.ok is false and either Weibo's own error message (finalResult.message) was absent or it defaulted to 'Weibo publish failed'. This means Weibo itself rejected or failed the post after the send click, as detected by the page's error toast / missing new post.","triggerScenarios":"page.evaluate result poll returns finalResult = {ok:false, message?...}; the command raises CommandExecutionError(message || 'Weibo publish failed').","commonSituations":"Weibo content moderation rejected the text (sensitive words, spam heuristics); posting frequency limit hit for the account; session expired mid-flow; images rejected server-side after submit.","solutions":["Read the specific message from the error when available — it usually mirrors Weibo's on-page toast","Check the account on weibo.com for restrictions/verification prompts","Revise the post content (remove flagged keywords/links) and retry","Re-login to Weibo in the browser if the session expired"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// pre-screen content locally\nconst banned = [/敏感/, /赌/, /代刷/];\nif (banned.some(re => re.test(text))) {\n    console.warn('Content may be rejected by Weibo moderation');\n}","typeGuard":null,"tryCatchPattern":"try {\n    await publishToWeibo(text);\n} catch (err) {\n    if (String(err.message).includes('Weibo publish failed')) {\n        console.error('Weibo rejected the post. Check account status and revise content.');\n    } else throw err;\n}","preventionTips":["Avoid sensitive keywords, spammy links, and duplicate posts","Respect posting frequency limits in automation schedules","Re-login to Weibo when sessions age out","Read finalResult.message when present for the actual rejection reason"],"tags":["weibo","publish-rejected","moderation"],"backgroundTag":"publish-rejected","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}