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_successful
property. IfTrue
, no blocking exceptions were found for the requested outputs.
Quick check (Python)
```python from werk24 import TechreadMessage # adjust import to your setup
msg: TechreadMessage = client.read(...) # your call here
if msg.is_successful: print("✅ All requested outputs available.") else: print("❌ One or more pages reported exceptions.") for page in msg.pages: if page.exceptions: print(f"Page {page.index}:") for ex in page.exceptions: print(f" - {ex.code}: {ex.message or ''}") ````
Tip: Even when
is_successful
isFalse
, inspect per-page results—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) 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. 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 (preferably 400–600 DPI); 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). | Downscale to a supported maximum or split into tiles with overlap. See Supported Paper Sizes. |
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: CONFIGURATION_INCORRECT
requires client v2.3.0+. Older clients surface similar issues as DRAWING_CONTENT_NOT_UNDERSTOOD
.
Troubleshooting checklist
- Validate inputs: Confirm file format, page count, paper size, and DPI (≥200 DPI recommended).
- 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 page.exceptions
is empty.
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
.