message, and usually a stable error_code. Use the status to identify the broad category and the code to decide what the application should do.
Start with the evidence
Before changing retry logic:- Record the operation, timestamp, status,
error_code, and response headers. - Confirm that
CONTEXT_DEV_API_KEYexists without printing its value. - Reproduce the request with raw HTTPS so SDK serialization is not part of the test.
- Compare the request with the operation’s current API-reference page.
- Check the status page when unrelated operations fail at the same time.
- Brand request
- Web request
Decide by status
The same
error_code can appear under different statuses on different operations. Build logic around the combination documented for the endpoint you call.
Input and website errors
WEBSITE_BLOCKED on the scrape endpoints is not billed. For any error response that includes key_metadata, use credits_consumed as the operation-specific billing evidence.
Authentication and access
For401 UNAUTHORIZED:
.env file, a rotated key, or initializing the client before environment loading runs.
For 403, inspect the code:
Repeating a
401 or 403 request does not repair credentials or permissions.
Handle timeouts
timeoutMS is the request’s hard time budget. Cache misses and operations that crawl or run models can take longer than cache hits.
For a Brand request on a cold domain, a timeout below 10 seconds can return 422 COLD_DOMAIN_TIMEOUT_TOO_LOW before retrieval starts. Raise the budget or prefetch the identifier before it is needed.
For 408 REQUEST_TIMEOUT:
- Move optional work to a background job.
- Increase
timeoutMSonly when the product can wait longer. - Use a smaller crawl or extraction scope.
- Retry with a small total attempt count.
- Do not hide a multi-minute retry chain inside a user request.
Handle email rejection
Invalid email
Brand-by-email, people enrichment, and email prefetch operations can return:FREE_EMAIL_DETECTEDDISPOSABLE_EMAIL_DETECTEDINPUT_VALIDATION_ERRORfor malformed input
Content limits
Changing a timeout or retry delay does not fix a size or media-type failure.
Handle ZDR errors
Do not silently retry without
zdr; that changes the data-handling promise. Either stop the request or follow an explicitly approved non-ZDR path. See Zero Data Retention.
Batch and monitor errors
These codes describe resource state rather than a transient transport problem:BATCH_LIMIT_EXCEEDED: wait for active work to finish or reduce concurrency.BATCH_NOT_COMPLETED: keep polling with backoff; results are not ready.BATCH_NOT_CANCELLABLE: the batch has reached a state that cannot be cancelled.IDEMPOTENCY_KEY_CONFLICT: the key was reused with a different body; use the original body or a new key.MONITOR_LIMIT_EXCEEDED: reduce monitor count or change the plan.MONITOR_PAUSED: resume the monitor before running it.MONITOR_NO_WEBHOOK: add a webhook before rotating its secret.
Diagnose SDK mismatches
Check these when cURL works:- The installed package version matches the documentation you followed.
- Parameter casing matches the language, such as
maxAgeMsin TypeScript andmax_age_msin Python. - The SDK sends the documented HTTP method and path.
- A generated union accepts only fields from one request variant.
- An SDK’s automatic retry policy is not masking the first response.
v1.5.0 and the PHP SDK v2.14.0 have known Brand request compatibility issues. Check the versions and examples in the SDK guide. Use raw HTTP when your installed client cannot represent the current POST /brand/retrieve request.
Handle partial success
A200 can still contain:
- Missing optional Brand fields.
- An empty Markdown result because an include selector matched nothing.
- Page-level crawl failures inside an otherwise successful crawl response.
- Skipped or blocked pages in structured extraction metadata.
- Low-confidence classification candidates.
Contact support
If the problem persists, contact [email protected] with:- Operation path and HTTP method.
- UTC timestamp and region.
- Status,
error_code, response headers, and response body. - A redacted request body or query.
- SDK language and exact package version, if applicable.
- Whether the equivalent cURL request succeeded.
Next steps
Rate limits
Read limit headers and recover from 429 responses.
Production checklist
Add retries, fallback states, and request observability.
API stability
Separate API contract changes from SDK compatibility issues.