Handle errors in Chunkr AI API
ErrorHandlingStrategy
configuration allows you to specify how the system should respond when errors occur during document processing.
Strategy | Description |
---|---|
ErrorHandlingStrategy.FAIL | Default behavior. Processing stops immediately when any error occurs. The task will fail and return status FAILED . |
ErrorHandlingStrategy.CONTINUE | Processing continues despite non-critical errors. The system will make reasonable attempts to recover and continue with the remaining content. |
error_handling=ErrorHandlingStrategy.CONTINUE
, the system will attempt to gracefully handle various types of errors:
Continue
mode during layout analysis:
Continue
mode with OCR processing:
OcrStrategy.AUTO
modeErrorHandlingStrategy.CONTINUE
when partial results are better than completely failed processing.
For critical applications where accuracy is paramount, you may prefer the default ErrorHandlingStrategy.FAIL
to ensure you’re alerted to any processing issues.