{"record":{"id":"83e55b3e6b6efdde","repo":"jackwener/OpenCLI","slug":"result-message-could-not-add-muted-word","errorCode":null,"errorMessage":"${result?.message || 'Could not add muted word.'}","messagePattern":"\\$\\{result\\?\\.message \\|\\| 'Could not add muted word\\.'\\}","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/twitter/mute-word.js","lineNumber":176,"sourceCode":"                    if (hasNewExactKeywordRow(beforeRows)) {\n                        return { ok: true, message: 'Muted word added.' };\n                    }\n                }\n                return { ok: false, unconfirmed: true, message: 'Muted word submission did not show confirmation.' };\n            } catch (error) {\n                return { ok: false, unconfirmed: writeStarted, message: String(error?.message || error) };\n            }\n        })()`);\n\n        if (result?.unconfirmed) {\n            throw new TimeoutError(\n                'twitter mute-word confirmation',\n                5,\n                `${result.message} Check muted words before retrying; the word may already have been added.`,\n            );\n        }\n        if (!result?.ok) {\n            throw new CommandExecutionError(\n                result?.message || 'Could not add muted word.',\n                'Nothing changed. Open Twitter/X muted word settings in the browser and retry.',\n            );\n        }\n\n        return [{\n            keyword,\n            status: 'success',\n            message: result.message || 'Muted word added.',\n        }];\n    },\n});\n","sourceCodeStart":158,"sourceCodeEnd":189,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/twitter/mute-word.js#L158-L189","documentation":"CommandExecutionError thrown when the in-page add-muted-keyword script definitively failed (result.ok is false and result.unconfirmed is false). The first argument is the error message surfaced from the page script (or a generic fallback), and the second argument advises that nothing was changed and the user should complete the action manually in the browser. Unlike the timeout case, the write did NOT start, so retrying in-CLI is safe.","triggerScenarios":"The in-page script returned { ok: false, message } without writeStarted — selectors for the add-keyword form/button were not found, the page did not load the add_muted_keyword settings route, or Twitter rejected the input (e.g. invalid/duplicate keyword rejected by the UI before any write).","commonSituations":"X.com UI redesign breaking the selectors the script relies on; the session landing on a login wall instead of settings; running against an account type (e.g. some restricted/premium contexts) where muted keywords are unavailable; invalid keyword input rejected client-side.","solutions":["Open https://x.com/settings/add_muted_keyword in a normal browser and add the keyword manually — nothing was changed by the failed run.","Verify the browser session is logged in and can actually reach the muted-keyword settings page (not a login redirect).","Check whether X changed the add-keyword UI; update the opencli twitter CLI to a version with current selectors.","Validate the keyword is acceptable to X (length/characters) and that your account tier supports muted keywords."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"const res = await page.goto('https://x.com/settings/add_muted_keyword');\nif (!res || !res.url().includes('add_muted_keyword')) {\n  throw new Error('Cannot reach muted-keyword settings; session may be logged out');\n}","typeGuard":null,"tryCatchPattern":"try {\n  await run(['twitter', 'mute-word', kw]);\n} catch (err) {\n  if (err.message.includes('Could not add muted word')) {\n    console.warn('Nothing was changed. Add manually: https://x.com/settings/add_muted_keyword');\n  } else throw err;\n}","preventionTips":["Verify the session is logged in and can reach the settings page before automating","Keep the CLI updated when X redesigns its settings UI","Fall back to the manual browser flow when the command reports nothing changed"],"tags":["twitter","browser-automation","ui-change","manual-fallback"],"backgroundTag":"browser-automation-failed","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}