Skip to main content

File-processing errors should tell users what to try next

Updated 3 min readMarkdown
File-processing errors should tell users what to try next

A file tool can finish the easy case perfectly and still lose trust on the first failed upload. When a PDF or image cannot be processed, “Something went wrong” leaves the user doing the debugging.

A useful error message does two jobs: explain what failed at the level the product can know, and offer a safe next step. Here is a practical way to design that path.

  1. Separate the failure categories

Avoid treating every failure as one generic processing error. Distinguish cases your application can actually identify:

• Unsupported or unrecognized format: name the formats the tool accepts. Validate file content where possible; a filename extension alone is not proof of its format. • Corrupt or unreadable file: say the file could not be opened and suggest exporting or downloading a fresh copy. • File exceeds a known limit: state the limit and offer a realistic next step, such as splitting a PDF or reducing image dimensions. • Resource or processing failure: explain that the operation did not complete and give a retry or smaller-file option when appropriate.

Do not guess at a cause the application cannot verify. “This PDF is password-protected” is helpful only if the parser actually detected encryption; otherwise say it could not be read.

  1. Make limits visible before the user commits

If there is a maximum file size, page count, or image dimension, show it near the selection control as well as in the error state. Check the limit early, before expensive processing begins. Keep the displayed value tied to the same configuration used by the server or client so the interface does not promise a limit the processor rejects.

  1. Preserve useful diagnostics without exposing internals

Record a stable error category and a request or operation identifier for support. Keep stack traces, local paths, and raw document contents out of user-facing copy. Logs should contain only the data needed to diagnose the failure, with retention that matches the product’s actual privacy commitments.

  1. Design recovery as part of the error

A good failure state can answer: Can I retry? Should I choose another file? Can I split or resize it? Is the file still available in this tab? Avoid implying that data was uploaded or retained unless that is what happened. Privacy wording should describe the real processing path, not a broad promise.

  1. Test the message, not just the exception

For each failure category, test the user-visible text and the next action. Include boundary files just below and above limits, unsupported formats with misleading extensions, and damaged documents. A test that only asserts “an error was thrown” misses the part the user needs.

The goal is not to make errors sound friendly. It is to reduce the next guess the user has to make. If you build file tools, what failure message has saved your users the most time?

1 view

About the author

  • Founder of ZANCTA (zancta.tech) - PDF and image tools that run entirely in the browser, with no uploads and no server-side processing. I write about what client-only processing actually costs: model size budgets against user patience, WebAssembly memory ceilings on input size, and why a privacy guarantee needs engineering behind it, not just a claim on a landing page. Full-stack: Next.js, TypeScript, Node.js, PostgreSQL.

No comments yet. Be the first to comment.