MCPcopy
hub / github.com/codeaashu/claude-code / getPdfTooLargeErrorMessage

Function getPdfTooLargeErrorMessage

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

Source from the content-addressed store, hash-verified

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