Skip to main content

Error envelope

Every error response uses the same shape:

Error code catalog


unauthorized

HTTP: 401 Your Authorization header is missing, malformed, doesn’t match the al_(live|test)_[a-zA-Z0-9]{32} format, or the key has been revoked or never existed.
Fix: Check the header is Authorization: Bearer al_live_.... If the key was revoked, create a new one.

forbidden

HTTP: 403 Your account isn’t in an ACTIVE or TRIAL state (e.g. CANCELED or PAST_DUE). The key is valid, but billing is blocking new requests. Fix: Update your card in the dashboard or contact support@acrelens.com.

api_access_required

HTTP: 403 Your plan does not include REST API access. The API is available on Pro and above — upgrade at acrelens.com/pricing. This applies to Free and Starter subscription accounts; legacy pay-as-you-go accounts keep API access. Fix: Upgrade to Pro (or above) in the dashboard, or see pricing.

insufficient_balance

HTTP: 402 You’re a PAYG customer, your balance is below $3.99, and you have no free trial reports remaining. Fix: Top up in the dashboard, or enable auto-recharge so this doesn’t happen again.

DAILY_CAP_EXCEEDED

HTTP: 402 You set a daily spend cap and this request would push you over it. Fix: Wait until 00:00 UTC for the cap to reset, or raise/remove the cap in Manage → Limits. See spend caps.

MONTHLY_CAP_EXCEEDED

HTTP: 402 Same as above, monthly. Resets on the first of the calendar month.

not_found

HTTP: 404 The resource (report, batch, state profile) doesn’t exist, or it belongs to a different customer. AcreLens deliberately returns the same code in both cases — we don’t leak existence of other customers’ resources. Fix: Verify the ID. If you think a report has gone missing on your end, check the dashboard’s recent reports view.

idempotency_conflict

HTTP: 409 You sent the same Idempotency-Key as a recent request but the body differs. Idempotency requires the body to match (canonical JSON, key order doesn’t matter). Fix: Use a fresh Idempotency-Key for distinct requests. See the idempotency guide.

validation_failed

HTTP: 422 Your request body or query parameters failed validation. The error envelope includes a fields array with per-field messages:
Fix: Surface the per-field messages to your form, or log them and fix the request.

rate_limit_exceeded

HTTP: 429 You’re sending requests faster than your tier allows. The response includes a Retry-After header (seconds). Fix: Wait Retry-After, jitter, and back off if you keep hitting it. See rate limits for the correct retry pattern.

quota_exceeded

HTTP: 429 You’ve reached your monthly report/quota limit. Subscription accounts on the Free plan hit this after their monthly report allotment (3 reports) is used; legacy tier-based plans (DEVELOPER) also trigger it at their monthly quota. Legacy PAYG accounts don’t have a report quota. Fix: Wait for the period to reset, or contact us about a higher limit.

upstream_error

HTTP: 502 A downstream dependency we rely on (Stripe, geocoder, NREL) is failing. AcreLens marks this retriable: true. Fix: Exponential backoff — 1s → 2s → 4s → 8s. If it persists more than a few minutes, check status.acrelens.com or email support.

internal_error

HTTP: 500 or 503 An unexpected error on our side. AcreLens marks this retriable: true. Fix: Retry once after a short delay. If it persists, contact support with the request_id — we can correlate it to the trace and root-cause faster than you can.

Reading errors in code

Switch on error.code, not on HTTP status — multiple codes can share a status (429 is both rate_limit_exceeded and quota_exceeded):

Support

When something doesn’t match this doc, send us the request_id from the error and a one-line description: support@acrelens.com.