chatboxai/chatbox · error · FilePreprocessFailure
file_storage_quota_exceeded
file_storage_quota_exceeded
Error message
file_storage_quota_exceeded
What it means
FilePreprocessFailure with code file_storage_quota_exceeded, thrown from fallbackToChatboxAIParser when the cloud-parse path caught a storage-quota error. The comment explains that a full client-side database breaks cloud parsing too — persisting the parsed content fails the same way — so the quota error is preserved for an accurate user message and sanitized Sentry report rather than masked as a parser failure.
Source
Thrown at src/renderer/stores/sessionHelpers.ts:390
return { content, storageKey: uniqKey, tokenCountMap: {}, parserType: 'local' }
}
async function fallbackToChatboxAIParser(
file: File,
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())
)
}View on GitHub (pinned to 81571269ad)
Solutions
- Free local storage: clear old attachments/history, evict large blobs.
- Raise awareness in the UI with the file_storage_quota_exceeded message and a 'clear history' action.
- Quota errors are non-recoverable for cloud fallback too; do not retry — prompt the user to free space.
- Consider lazy/on-demand blob storage instead of persisting full parsed content.
Example fix
// before
if (isStorageQuotaError(error)) {
throw new FilePreprocessFailure(FILE_STORAGE_QUOTA_EXCEEDED_ERROR, 'cloud_parse', error)
}
// after
if (isStorageQuotaError(error)) {
throw new FilePreprocessFailure(FILE_STORAGE_QUOTA_EXCEEDED_ERROR, 'cloud_parse', error)
} Defensive patterns
Strategy: try-catch
Type guard
function isFileStorageQuotaFailure(e: unknown): e is { code: 'file_storage_quota_exceeded'; name: 'FilePreprocessFailure' } {
return e instanceof Error && (e as { code?: string }).code === 'file_storage_quota_exceeded'
} Try / catch
try {
return await parseFileWithLocalFallback(file, uniqKey, options)
} catch (err) {
if (isFileStorageQuotaFailure(err)) {
notifyUser('Local storage is full. Clear old attachments/history and try again.')
return null
}
throw err
} Prevention
- Free local storage before attaching large files.
- Do not retry — cloud persist fails identically when storage is full.
- Evict large/old blobs proactively.
When it happens
Trigger: After local parsing failed, the code falls back to parseFileWithChatboxAI; that path tries to persist the parsed text via IndexedDB/local storage and the write throws a QuotaExceededError (name match or message regex). isStorageQuotaError returns true and the helper wraps it.
Common situations: User's browser/Electron storage is full (many large attachments/history), private browsing mode with strict quotas, or a device with very low free space. The cloud parser succeeded but the local persist step failed.
Related errors
AI-assisted analysis of chatboxai/chatbox@81571269ad (2026-08-12).
Data as JSON: /api/errors/2aa2b95866dc160f.
Report an issue: GitHub.