MCPcopy Create free account
hub / github.com/Noumena-Network/code / getPdfTooLargeErrorMessage

Function getPdfTooLargeErrorMessage

src/services/api/errors.ts:168–173  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

166 'Opus is experiencing high load, please use /model to switch to Sonnet'
167export const API_TIMEOUT_ERROR_MESSAGE = 'Request timed out'
168export function getPdfTooLargeErrorMessage(): string {
169 const limits = `max ${API_PDF_MAX_PAGES} pages, ${formatFileSize(PDF_TARGET_RAW_SIZE)}`
170 return getIsNonInteractiveSession()
171 ? `PDF too large (${limits}). Try reading the file a different way (e.g., extract text with pdftotext).`
172 : `PDF too large (${limits}). Double press esc to go back and try again, or use pdftotext to convert to text first.`
173}
174export function getPdfPasswordProtectedErrorMessage(): string {
175 return getIsNonInteractiveSession()
176 ? 'PDF is password protected. Try using a CLI tool to extract or convert the PDF.'

Callers 2

normalizeMessagesForAPIFunction · 0.85

Calls 2

formatFileSizeFunction · 0.85

Tested by

no test coverage detected