MCPcopy Create free account
hub / github.com/Gan-Xing/CodexBridge / formatCodexLoginError

Function formatCodexLoginError

src/core/bridge_coordinator.ts:20838–20844  ·  view source on GitHub ↗
(error, i18n = createI18n())

Source from the content-addressed store, hash-verified

20836}
20837
20838function formatCodexLoginError(error, i18n = createI18n()) {
20839 const message = formatUserError(error);
20840 if (/just a moment|cloudflare/iu.test(message) || /auth\.openai\.com\/oauth\/device\/code/iu.test(message)) {
20841 return i18n.t('coordinator.login.cloudflareBlocked');
20842 }
20843 return truncateCoordinatorText(message, 240);
20844}
20845
20846function readRecentCodexRuntimeError(logPath = path.join(os.homedir(), '.codex', 'log', 'codex-tui.log'), i18n = createI18n()) {
20847 try {

Callers 1

Calls 4

createI18nFunction · 0.85
formatUserErrorFunction · 0.85
truncateCoordinatorTextFunction · 0.85
tMethod · 0.65

Tested by

no test coverage detected