Error Handling
The THEARY Background Check API uses conventional HTTP response codes and returns detailed error information to help you troubleshoot issues.HTTP Status Codes
The API uses the following HTTP status codes:| Status Code | Description |
|---|---|
200 | Success - Request completed successfully |
201 | Created - Resource created successfully |
400 | Bad Request - Invalid parameters or missing required fields |
401 | Unauthorized - Invalid or missing authentication |
404 | Not Found - Resource doesn’t exist |
500 | Internal Server Error - Something went wrong on our end |
Error Response Format
All error responses follow a consistent format:Common Error Scenarios
Authentication Errors (401)
Missing Authorization Header:Validation Errors (400)
Missing Required Fields:Resource Not Found (404)
Order Not Found:Error Handling Best Practices
1. Always Check Status Codes
2. Handle Validation Errors
3. Implement Retry Logic
For transient errors (500, network issues), implement exponential backoff:Troubleshooting Common Issues
Issue: “Criminal check jurisdictions are required”
Cause: You includedCRIMINAL in searchTypes but didn’t provide criminalCheck configuration.
Solution: Add the criminalCheck object:
Issue: “Address validation failed”
Cause: Invalid address configuration - exactly one address must be current (endDate: null). Solution: Ensure one address has endDate: null:Issue: “Invalid date format”
Cause: Dates must be in YYYY-MM-DD format. Solution: Use proper date format:Workflow Terminal Conditions
The API automatically handles terminal conditions that stop workflow progression:Research Phase Terminal Conditions
- No contacts found: Triggers
verification.action_requiredwithHUMAN_ESCALATIONreason code - Third-party record detected: Triggers
verification.action_requiredwithTHIRD_PARTY_RECORDreason code (includes structured contact details)
Outbound Phase Terminal Conditions
- Transient retry cap reached: After 3 transient retries per channel (voice/email), search is reassigned to human escalation with
HUMAN_ESCALATIONreason code - Workflow failure: After max retries, workflow is terminalized with appropriate reason code (
SYSTEM_FAILUREorUPSTREAM_ISSUE)
SLA and Automatic Reassignment
The system automatically monitors searches and reassigns them to human escalation when necessary:- Frequency: Checks run every 4 hours (system-level, not configurable)
- Search SLA: Default 24 hours (tenant-configurable via
policy.global.searchSlaMinutes) - Reassignment Window: Default 48 hours, allows 2 outbound attempts before escalation (tenant-configurable via
policy.global.reassignmentWindowMinutes) - Weekend Adjustment: All deadlines (SLA and reassignment) are automatically extended if they fall on weekends (Saturday/Sunday) to the next Monday (system behavior, not configurable)
- Reassignment Trigger: Searches are reassigned when they exceed either the search SLA or reach the reassignment window (whichever comes first)
- Reason Code: Reassigned searches receive
HUMAN_ESCALATIONwith detailed metadata - Contact Plan Inclusion: Optionally include research contact plan data in escalation webhooks (tenant-configurable via
policy.global.includeContactPlanInEscalation, default:false)
- Search created Friday 5 PM
- 24-hour SLA would be Saturday 5 PM
- Automatically extended to Monday 5 PM
- Ensures consistent handling regardless of when searches are created
Configuring SLA and Reassignment Settings
These settings are configured at the tenant level via the unified policy configuration:| Parameter | Type | Default | Description |
|---|---|---|---|
searchSlaMinutes | number | 1440 | Search SLA timeout in minutes (default: 24 hours). Searches exceeding this are reassigned to human escalation. |
reassignmentWindowMinutes | number | 2880 | Reassignment window in minutes (default: 48 hours). Allows 2 outbound attempts before escalation. |
includeContactPlanInEscalation | boolean | false | Whether to include contact plan research data in HUMAN_ESCALATION webhooks. Provides operators with research context for follow-up. |
searchSlaMinutes and reassignmentWindowMinutes are weekend-adjusted automatically. The system uses whichever threshold is reached first when determining automatic reassignment.
Important Notes
- When a workflow is terminalized, no further outbound attempts are made
- Email fallback is prevented if workflow is terminalized to avoid duplicate communications
- Terminal conditions are idempotent - if terminalization fails, workflow still stops to prevent incorrect state transitions
- Automatic reassignment is also idempotent - searches already reassigned are not re-escalated (no duplicate webhooks)
- Contact plan research data may be included in
HUMAN_ESCALATIONwebhooks whenincludeContactPlanInEscalationis enabled (opt-in per tenant, default:false) - Retry cap failures now properly escalate to human review instead of being masked by communication errors
Getting Help
If you encounter issues not covered here:- Check the API Reference for endpoint-specific details
- Verify your request format matches the examples
- Review Webhook Events for terminal condition details
- Contact support at [email protected]