MCPcopy
hub / github.com/simstudioai/sim / createPdfFailureMessage

Function createPdfFailureMessage

apps/sim/app/api/files/parse/route.ts:1155–1167  ·  view source on GitHub ↗

* Create error message for PDF parsing failure and make it more readable

(
  pageCount: number,
  size: number,
  path: string,
  error: string
)

Source from the content-addressed store, hash-verified

1153 * Create error message for PDF parsing failure and make it more readable
1154 */
1155function createPdfFailureMessage(
1156 pageCount: number,
1157 size: number,
1158 path: string,
1159 error: string
1160): string {
1161 return `PDF document - Processing failed, ${prettySize(size)}
1162Path: ${path}
1163Error: ${error}
1164
1165This file appears to be a PDF document that could not be processed.
1166Please use a PDF viewer for best results.`
1167}

Callers 1

handlePdfBufferFunction · 0.85

Calls 1

prettySizeFunction · 0.85

Tested by

no test coverage detected