Error handling
Understanding how automation apps handle empty or null results can help you troubleshoot extraction issues and handle errors in downstream systems.
When a result can’t be extracted for a specific field, the field returns either an empty string (""
) or null
. These values are displayed differently across AI Hub interfaces.
Handling empty results in custom functions
When writing custom functions, treat both ""
and null
as empty values to ensure predictable behavior across different extraction scenarios.
When processing app results through APIs or integration functions, implement error handling for empty field values.
Customizing error messages
Customize how automation apps handle missing values using specific prompts or custom functions.
-
Field prompts — Include instructions like If not found, return ‘Not Available’ in your field description or prompt.
-
Cleaning function — Transform empty results into standardized messages.
-
Validation function — Flag empty values for human review when the field is required.
Troubleshooting extraction failures
If fields consistently return empty values, try these troubleshooting steps.
-
Review field configuration — Verify that the field name and description accurately describe the data you want to extract, and that the field type is appropriate to the data.
-
Check digitization quality — Poor OCR quality can prevent successful extraction. Review digitization settings and view the document in text-only view to verify that the data you want to extract is present and legible.
-
Test with different models — Some models perform better with specific document types or extraction scenarios.