chatboxai/chatbox · warning · Error
chatbox_ai_parser_failed
Error message
chatbox_ai_parser_failed
What it means
Generic cloud-parser failure thrown from fallbackToChatboxAIParser. After local parsing failed and the Chatbox AI cloud parser also rejected the file for any reason other than quota or empty content, the helper throws the catch-all 'chatbox_ai_parser_failed'. The two recoverable/specific cases (quota, empty content) are re-thrown as-is first.
Source
Thrown at src/renderer/stores/sessionHelpers.ts:395
uniqKey: string,
reason: 'local_parser_failed' | 'empty_content'
): Promise<{ content: string; storageKey: string; tokenCountMap: Record<string, number>; parserType: string }> {
log.warn(`Falling back to Chatbox AI parser for "${file.name}" due to ${reason}`)
try {
return await parseFileWithChatboxAI(file, uniqKey)
} catch (error) {
log.error(`Chatbox AI fallback parsing failed for "${file.name}":`, error)
// A full client-side storage database is not a cloud-parser problem — persisting the
// parsed content fails the same way. Preserve it for the quota-specific user message
// and sanitized Sentry report at the outer boundary.
if (isStorageQuotaError(error)) {
throw new FilePreprocessFailure(FILE_STORAGE_QUOTA_EXCEEDED_ERROR, 'cloud_parse', error)
}
if (error instanceof Error && error.message === EMPTY_ATTACHMENT_CONTENT_ERROR) {
throw error
}
throw new Error('chatbox_ai_parser_failed')
}
}
type LocalParserFallbackOptions = {
allowChatboxAIFallback?: boolean
forceChatboxAIFallback?: boolean
}
function shouldFallbackToChatboxAI(options: LocalParserFallbackOptions): boolean {
return (
Boolean(options.forceChatboxAIFallback) || (options.allowChatboxAIFallback !== false && canFallbackToChatboxAI())
)
}
async function parseFileWithLocalFallback(
file: File,
uniqKey: string,
options: LocalParserFallbackOptions = {}View on GitHub (pinned to 81571269ad)
Solutions
- Distinguish transient (network/5xx) from permanent (unsupported) failures — retry the former once.
- Verify network connectivity and Chatbox AI endpoint reachability.
- Confirm the file type is supported by the cloud parser before upload.
- Log the underlying error (redacted) to separate network vs server-side causes.
Example fix
// before
throw new Error('chatbox_ai_parser_failed')
// after
throw new Error('chatbox_ai_parser_failed') Defensive patterns
Strategy: retry
Type guard
function isChatboxAIParserFailure(e: unknown): boolean {
return e instanceof Error && e.message === 'chatbox_ai_parser_failed'
} Try / catch
try {
return await parseFileWithLocalFallback(file, uniqKey, options)
} catch (err) {
if (isChatboxAIParserFailure(err) && isTransientNetwork) return await parseFileWithLocalFallback(file, uniqKey, options)
throw err
} Prevention
- Distinguish transient (network/5xx) from permanent (unsupported) cloud failures.
- Verify connectivity and Chatbox AI endpoint before upload.
- Confirm the file type is supported by the cloud parser.
When it happens
Trigger: parseFileWithChatboxAI throws an error that is not a storage-quota error and not the empty-attachment-content error: network failure to the cloud parser, HTTP 5xx, unsupported file format server-side, or an auth/licensing rejection.
Common situations: Network blip during cloud parse upload, Chatbox AI backend temporarily unavailable, file format unsupported by the cloud parser, license/quota misconfigured (but not the local-storage quota).
Related errors
- file_storage_quota_exceeded
- local_parser_failed
- empty_attachment_content
- Knowledge base name cannot be empty
- Knowledge base ${kbId} not found
AI-assisted analysis of chatboxai/chatbox@81571269ad (2026-08-12).
Data as JSON: /api/errors/ef7e3119aaf2976d.
Report an issue: GitHub.