Error Handling
Werk24 returns a TechreadMessage for each request. This message includes an exceptions array listing any issues detected while processing your files.
Key points
- Per-page granularity: Exceptions are tracked per page. If you upload a two-page document (e.g., a drawing on page 1 and an order form on page 2), you may receive valid results for page 1 and an exception for page 2.
- Success check: When using the Python models, prefer the
is_successfulproperty. IfTrue, no blocking exceptions were found for the requested outputs. - Levels: Only an exception with
exception_levelERRORis blocking. AWARNINGrides on a message whose results stand, such as a completed read that is knowingly incomplete (see Incomplete reads).
Quick check (Python)
Tip: Even when
is_successfulisFalsefor one message, inspect the other messages, since you may still have usable outputs for unaffected pages.
Exception types
| Code | What it means | Typical causes | How to fix |
|---|---|---|---|
DRAWING_FILE_FORMAT_UNSUPPORTED | The file/container or an embedded page uses a format we don’t support. | Exotic CAD/PDF variants; encrypted PDFs; image types outside supported list. | Export to a supported format (PDF, PNG, TIFF, JPEG; HPGL through read_drawing) or re-save as a standard PDF. See Supported File Types. |
DRAWING_FILE_SIZE_TOO_LARGE | The uploaded file exceeds the allowed size. | Very high-resolution scans; many pages; embedded bitmaps. | Reduce resolution, compress, split document, or upload only relevant pages. Callback requests allow only about 4.6 MB; use read_drawing for larger files. See Supported File Sizes. |
DRAWING_RESOLUTION_TOO_LOW | Image/text features cannot be read reliably. | Low-DPI scans; heavy compression; camera photos with blur. | Re-scan at ≥300 DPI (300–400 DPI recommended); avoid JPEG artifacts; straighten/crop before upload. See Supported Resolutions. |
DRAWING_CONTENT_NOT_UNDERSTOOD | The page content could not be interpreted as a technical drawing. | Non-drawing pages (emails, order forms), extreme noise, missing contrast. | Remove non-drawing pages; improve scan quality; ensure black-on-white contrast. |
DRAWING_PAPER_SIZE_TOO_LARGE | Paper dimensions exceed supported limits. | Oversized sheets (e.g., non-standard posters). | Re-scan at 300 DPI rather than downscaling, which loses the detail the extraction needs. Only split into tiles if the sheet itself is beyond A0. See Supported Paper Sizes. |
DRAWING_PAGE_COUNT_TOO_LARGE | The document has more pages than can be processed for an output that must cover the whole document (e.g. redaction). The server limit is 5 pages. | Multi-page documents over 5 pages submitted for redaction. | Split the document into parts of at most 5 pages, or submit only the relevant pages. See Redaction. |
CONFIGURATION_INCORRECT | Request parameters are incomplete or malformed. | Missing required hooks/asks; conflicting options; invalid enums or UUIDs. | Validate your request schema; fix conflicting options; see the API docs for required fields. |
Version note: DRAWING_FILE_SIZE_TOO_LARGE is reported by the Python client when read_drawing cannot upload a drawing over 10 MiB. Version 2.7.0 is the exception: it raises a TypeError there instead, which is fixed in versions newer than 2.7.0. A callback request never receives this code: from versions newer than 2.7.0 the client raises CallbackDrawingTooLargeException before sending an oversized request; with version 2.7.0 or older, or without the client, the request is sent and refused without a request_id, so check the size yourself. See Drawing File Size Limit.
Version note: CONFIGURATION_INCORRECT requires client v2.3.0+. Older clients surface similar issues as DRAWING_CONTENT_NOT_UNDERSTOOD.
Version note: DRAWING_PAGE_COUNT_TOO_LARGE is only sent to clients reporting a version newer than 2.5.0 (the Python client added support in v2.6.0). Clients on v2.5.0 or older receive no redaction result and no error for over-limit documents. Upgrade to at least v2.6.0.
Incomplete reads
Some parts of a read are best-effort. When one of them could not finish, Werk24 still delivers everything it did read rather than failing the request, and says so on the final COMPLETED progress message with one exception: exception_level WARNING and exception_type READ_INCOMPLETE.
The message is still successful: is_successful is True, and every result you already received stands. What the warning tells you is that some of those results may be less complete than the drawing allows.
Re-submitting the same drawing usually gives a complete read, because the causes are usually transient.
Version note: READ_INCOMPLETE warnings are only sent to clients reporting version 2.8.0 or newer. Older clients accept only the exception levels and types they know, so they receive the same COMPLETED message as before, without the warning.
What is billed
Werk24 bills per page. Whether a page is billed depends on whose side a problem was on:
- A page whose result was not delivered in full is not billed. When a read finishes with a
READ_INCOMPLETEwarning, only the pages that went out short are left off your bill; the other pages of the same request are billed. A page that ends in anERRORwhile its siblings finish is not billed either. - A read that fails on our side is not billed: an internal error, or a read that ran out of time.
- A read that fails on your side is billed: a file format we do not read, a resolution too low, too many pages, a paper size too large, an incorrect configuration, or a callback endpoint that refuses or cannot be reached. Sending the same drawing twice is two reads.
- A request refused before it is accepted is not billed: a
400,401,403or429from the HTTP API, and a drawing over the size limit.
Troubleshooting checklist
- Validate inputs: Confirm file format, page count and paper size. For raster inputs check resolution against the per-size targets rather than a single DPI number, because a figure that is fine on A4 is not on A1, and there is an upper limit as well. Check it yourself even for a scan saved as a PDF: nothing rejects those for resolution.
- Reduce variability: Remove non-drawing pages (cover sheets, order forms) or upload them separately.
- Tighten configuration: Ensure your request includes the correct hooks/asks and compatible options.
- Retry selectively: If only some pages failed, re-submit just those pages after corrections.
Frequently asked
Why do I get an exception for one page but results for another? Exceptions are per page; a failure on page 2 doesn’t invalidate page 1.
Can I still use partial results? Yes. Iterate pages and consume outputs where is_successful is True. Checking that exceptions is empty is not enough: a completed read can carry a non-blocking WARNING.
My read completed with a READ_INCOMPLETE warning. Did it fail? No. The results you received are valid; some of them may be less complete than the drawing allows. See Incomplete reads.
How do I distinguish configuration errors from content errors? On client v2.3.0+, malformed requests return CONFIGURATION_INCORRECT. Otherwise, similar symptoms may appear as DRAWING_CONTENT_NOT_UNDERSTOOD.