{"record":{"id":"474fefcb466d2209","repo":"decolua/9router","slug":"message-474fef","errorCode":null,"errorMessage":"⚠ ${message}","messagePattern":"⚠ \\$\\{message\\}","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/lib/oauth/utils/ui.js","lineNumber":20,"sourceCode":"import ora from \"ora\";\n\n/**\n * UI Helper Functions\n */\n\nexport function success(message) {\n  console.log(chalk.green(`\\n✓ ${message}\\n`));\n}\n\nexport function error(message) {\n  console.log(chalk.red(`\\n✗ ${message}\\n`));\n}\n\nexport function info(message) {\n  console.log(chalk.blue(`\\n${message}\\n`));\n}\n\nexport function warn(message) {\n  console.log(chalk.yellow(`\\n⚠ ${message}\\n`));\n}\n\nexport function gray(message) {\n  console.log(chalk.gray(message));\n}\n\nexport function spinner(text) {\n  return ora(text);\n}\n\nexport function printSection(title) {\n  console.log(chalk.blue(`\\n${title}\\n`));\n}\n\nexport function printKeyValue(key, value, isSuccess = false) {\n  const color = isSuccess ? chalk.green : chalk.gray;\n  console.log(color(`  ${key}: ${value}`));","sourceCodeStart":2,"sourceCodeEnd":38,"githubUrl":"https://github.com/decolua/9router/blob/90b52e06ffd666b7929554211474d01588f6b1f8/src/lib/oauth/utils/ui.js#L2-L38","documentation":"warn() is the OAuth CLI flow's user-facing warning printer: it renders a yellow '⚠ <message>' block to the console via chalk. It is not an exception — it indicates a non-fatal OAuth situation (e.g. skipped import, missing config, fallback behavior) reported during provider setup/login flows.","triggerScenarios":"Any OAuth helper or CLI flow calls warn('...') to surface a non-fatal condition: credential import found nothing to import, an existing account is reused, a step was skipped, or the user must take a manual action in a browser.","commonSituations":"Running an OAuth login/import command where the provider's token or local config is absent; headless environments where the browser flow was interrupted; re-running setup after partial completion; chalk not installed/plain TTY causing formatting fallback (cosmetic only).","solutions":["Read the accompanying message text — it names the skipped/failed OAuth step and usually the remedy.","Re-run the provider's OAuth login/import flow end-to-end to regenerate credentials.","Check the provider's stored credentials/config in the data dir and remove stale entries before retrying.","If the warning loops, run the command in an interactive terminal with a working browser or copy the printed auth URL manually."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// after an OAuth flow, verify credentials exist before depending on them\nimport { getProviderConnections } from \"@/lib/db/index.js\";\nconst conns = await getProviderConnections();\nif (!conns.some(c => c.provider === \"claude\" && c.accessToken)) {\n  console.log(\"No credentials — re-run the login/import flow\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Read the full ⚠ message — it names the skipped step.","Run OAuth flows in an interactive terminal with a working browser.","Re-run login/import after any partial completion.","Don't treat the ⚠ output as a crash; check subsequent command output for success."],"tags":["oauth","cli","warning","ux"],"backgroundTag":"oauth-flow-warning","analyzedSha":"90b52e06ffd666b7929554211474d01588f6b1f8","analyzedAt":"2026-08-30T21:05:45.952Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}