Documentation / Errors and limits
Errors and limits
Error response fields, HTTP status codes, and retry handling for Mapsource requests.
On this page
Error format
Gateway errors use a versioned JSON envelope. Use error.code for programmatic handling and error.message for a readable description.
retryable indicates whether an unchanged request may succeed later. details provides error-specific information, such as completed pipeline steps or an exceeded budget. Query-limit errors include numeric limit and value fields. Validation errors include issues with field paths and descriptions.
{
"error": {
"version": "1",
"code": "PIPELINE_STEP_FAILED",
"message": "filter needs by, op and value.",
"requestId": "01J8Z2K9V0QK2W5S6M4T1P3RXA",
"retryable": false,
"issues": [{ "level": "error", "path": "bad", "message": "filter needs by, op and value." }],
"details": { "completedSteps": [{ "id": "kept", "op": "limit", "count": 2 }], "failedAfter": 1, "totalSteps": 2 }
}
}The x-request-id response header identifies the request. For gateway errors it matches error.requestId. Include this ID in support requests. MCP tools may also expose the error under structuredContent.error; always check isError and the returned content.
Upstream and edge responses may use a different format. Check HTTP status and content type before parsing, and discard incomplete streamed responses.
All error codes
| Code | HTTP | Retryable | Meaning | Action |
|---|---|---|---|---|
BAD_REQUEST | 400 / 404 / 422 | no | Invalid input, unsupported route, or malformed query settings. | Correct the request; do not retry unchanged. |
AUTH_REQUIRED | 401 | no | No API key was supplied. | Add one Bearer Authorization header. |
AMBIGUOUS_CREDENTIAL | 400 | no | Credentials were supplied in more than one location, or on a website URL. | Keep only the Authorization header. |
INVALID_KEY | 401 | no | The key is invalid, expired, or revoked. | Check the key or contact support for replacement. |
ENTITLEMENT_INACTIVE | 403 | no | The subscription does not currently grant API access. | Check billing or contact support. |
RATE_LIMITED | 429 | yes | The per-key request rate is exhausted. | Wait for Retry-After and lower the request rate. |
CONCURRENCY_LIMITED | 429 | yes | Per-key or total service concurrency is full. | Wait for Retry-After and reduce parallel work. |
MONTHLY_QUOTA_EXHAUSTED | 429 | no | The monthly request allowance is exhausted. | Wait for the calendar-month quota reset; inspect usage. |
QUERY_TOO_LARGE | 422 | no | The query body exceeds the plan’s UTF-8 byte limit. | Reduce or split the query text. |
TIMEOUT_EXCEEDS_PLAN | 422 | no | The requested timeout is above the plan ceiling. | Lower timeout and reduce query scope if needed. |
MAXSIZE_EXCEEDS_PLAN | 422 | no | Requested query memory exceeds the plan. | Lower maxsize, specified in bytes. |
ATTIC_UNSUPPORTED | 422 | no | The query requests unsupported historical data. | Remove historical selectors or use a history-enabled provider. |
RESPONSE_TOO_LARGE | Stream failure | no | The response exceeded the byte ceiling. | Request fewer objects or less geometry; discard partial output. |
UPSTREAM_UNAVAILABLE | 502 / 503 | yes | A required query, tile, elevation, or other upstream service failed. | Check service status; use bounded backoff. |
UPSTREAM_TIMEOUT | 502 | yes | The query did not finish within its execution window. | Narrow the area or simplify the query before retrying. |
BILLING_NOT_CONFIGURED | 503 | no | The requested checkout, portal, or payment option is unavailable. | Retry later or contact support; do not retry payments in a loop. |
BILLING_PROFILE_UNAVAILABLE | 409 | no | This key is not attached to a Stripe subscription. | Use the subscription key issued after checkout. |
BILLING_PROVIDER_ERROR | 502 | no | Stripe could not complete the requested billing action. | Check for an existing session before restarting checkout. |
CHECKOUT_UNAUTHORIZED | 401 / 403 | no | The checkout action has no valid browser session or origin. | Return to the original checkout browser; contact support if needed. |
CHECKOUT_NOT_READY | 409 | yes | Payment confirmation is still being processed. | Wait for the completion page to refresh its state. |
KEY_ALREADY_CLAIMED | 409 | no | The initial checkout key has already been viewed. | Use your saved key or contact support for recovery. |
ADMIN_AUTH_REQUIRED | 401 | no | Administrator authentication is required. | Sign in through the configured SSO flow. |
ADMIN_FORBIDDEN | 403 | no | The signed-in identity is not authorized as an administrator. | Use an approved administrator identity. |
ADMIN_NOT_CONFIGURED | 503 | no | Administrator SSO configuration is incomplete. | The service operator must complete configuration. |
NOT_FOUND | 404 | no | The named resource does not exist. | Check the identifier against the listing endpoint the message names, such as /api/styles for a style preset. |
SCOPE_FORBIDDEN | 403 | no | The key does not have the required capability scope. | Use a credential with the required scope or ask an account administrator to update access. |
BUDGET_EXCEEDED | 429 | no | A hard usage budget on the project or the key has been reached for the current period. | Raise the budget, wait for the period to reset, or move the work to another project. error.details names which budget and its window. |
PAYMENT_REQUIRED | 402 | no | The route takes machine payment and no valid payment was presented. | Read the network, asset, amount, and recipient from PAYMENT-REQUIRED. Obtain payment authorization before signing. |
PIPELINE_INVALID | 422 | no | Invalid pipeline: duplicate IDs, forward or circular references, incompatible inputs, or excessive synchronous cost. | Correct the steps listed in error.issues. The pipeline was rejected before execution. |
PIPELINE_STEP_FAILED | 422 | no | One step failed after earlier steps had already run. | Inspect completed steps in error.details and correct the failed step before resubmitting. |
PIPELINE_DEADLINE_EXCEEDED | 504 | yes | A step, or the pipeline as a whole, ran past its deadline. | Inspect completed steps in error.details. Reduce the workload or split it into smaller pipelines. |
HANDLE_EXPIRED | 410 | no | The result handle has expired. Handle lifetime is 15 minutes. | Repeat the producing operation to obtain a new handle. Download payloads that require longer retention. |
HANDLE_QUOTA_EXCEEDED | 429 | no | This key already holds the maximum number, or maximum total bytes, of result handles. | Retrieve or let an existing handle expire before creating another; ask for a narrower result if the payloads are large. |
PROFILE_LIMIT_REACHED | 409 | no | This key already holds the maximum number of saved basemap profiles. | Delete a profile you no longer need, or replace an existing one by posting the same slug. |
STYLE_INVALID | 422 | no | The style manifest could not be compiled. | Correct the manifest paths listed in error.issues. Unknown semantic keys are warnings; unresolved tokens and invalid zoom ranges block compilation. |
INTERNAL_ERROR | 500 | yes | The gateway could not complete the request. | Retry reads with bounded backoff; report the request ID if repeated. |
Authentication failures
Send exactly one credential using Authorization: Bearer. Check for whitespace or a truncated value. A rotated key stops working immediately, while a scheduled cancellation can remain active until the paid period ends.
Do not retry 401 or 403 responses unchanged. Check your key and subscription. A support reference is not an API credential. For legacy integrations, the client guide lists accepted credential locations.
Query and stream errors
Reduce the bounding box, filter tags earlier, or request centers rather than full geometry when responses are too large. Set timeout and memory explicitly within the plan ceilings. Historical date, changed, and newer selectors are not supported.
RESPONSE_TOO_LARGE names the response-limit condition, but a streamed response that exceeds its cap can close without a fresh JSON error envelope. Treat truncated JSON, XML, or CSV as a failed request, even if you first received HTTP 200.
UPSTREAM_TIMEOUT uses HTTP 502. Edge timeouts may have a different status and response format.
Retry handling
- Do not retry invalid credentials or invalid query settings without changing them.
- For 429, check the code. Rate and concurrency limits can clear quickly; allowance exhaustion does not clear until the reported reset, a cap/policy change, or an upgrade. Explorer’s total limit does not reset.
- Honor Retry-After, then use exponential backoff with jitter for transient service failures. Cap the number of attempts.
- Reduce expensive queries after timeouts instead of immediately replaying them.
- Do not automatically retry checkout, key rotation, or a signed payment as if it were a read-only request.
// Retry-After can be seconds or an HTTP date.
function retryDelayMs(value) {
if (!value) return null;
const seconds = Number(value);
if (Number.isFinite(seconds)) return Math.max(0, seconds * 1000);
const date = Date.parse(value);
return Number.isFinite(date) ? Math.max(0, date - Date.now()) : null;
}Reporting a failure
Include the request ID, approximate UTC time, endpoint name, and error code. If relevant, share a minimal query after removing sensitive details. Never send an Authorization header, API key, payment signature, or full keyed URL.
Check service status and the usage dashboard first for a known outage or exhausted allowance.
Questions about this guide? Contact support.