Rejected files
A rejection is a problem with the file itself — not with the extraction — and Invofox tells you which file failed and why.
A file is rejected when Invofox can’t read it: a password-protected PDF, a corrupted file, or an unsupported format inside a ZIP (e.g. a .pptx or .exe). The file produces no document; instead a file.rejected webhook fires with the reason in its error field. (A direct upload of an unsupported type is refused up front with a 400, before anything is created.)
Listen for file.rejected to catch these in your pipeline. Your clientData is included, so you can correlate the rejection with your own records.
A rejected file fires only file.rejected — never document.processed, and it never appears via polling. If you don’t handle this event you’ll wait indefinitely for a document that will never arrive.
Error codes
When a File reaches rejected status, its error field contains one of the following codes:
error field for programmatic handling.The error field tells you what happened. Two common cases: