Docs › Build
Errors
Every Wazli Maps API error code, its HTTP status and message in English and Arabic, and what to do about it.
What an error looks like
Every refusal answers the same shape: a code your program can check, a message in English and, for the standard messages, the same message in Arabic (messageAr).
JSON
{
"error": {
"code": "over_daily_limit",
"message": "This key reached its daily limit for this API (UTC day).",
"messageAr": "بلغ هذا المفتاح حده اليومي لهذه الواجهة (يوم بتوقيت UTC)."
}
}Every code
| Code | Status | Message | What to do |
|---|---|---|---|
bad_request | 400 | The request is not valid. | Check the parameters against the product's page; the message names the one that is wrong. |
missing_key | 401 | Send your key as ?key= or in the X-Wazli-Key header. | Add your key as ?key= or in the X-Wazli-Key header. |
invalid_key | 401 | This key is not valid or was revoked. | Check that the whole key was copied. If it was replaced or revoked, ask the Wazli team for the new one. |
not_allowed_here | 403 | This key may not be used from this website or app. | This website or app is not on the key's list. Ask the Wazli team to add its address (with https://) or its app id. |
server_key_in_browser | 403 | This is a server key: keep it secret on your server. A web page needs a website key. | A server key was sent from a web page. Move the call to your server, or use a website key in the page. |
api_not_enabled | 403 | This key is not for this API. | The key does not include this product. Ask the Wazli team to add it to the key. |
account_suspended | 403 | This key's account is suspended. | Every key on the account is paused. Contact the Wazli team. |
not_found | 404 | Not found. | Check the address against the docs (for example a brand style name that does not exist). If the address is right, the service may be paused: contact the Wazli team. |
no_route | 404 | No route joins these two points. | No road joins the two points. Move a point onto or near a road and try again. |
over_daily_limit | 429 | This key reached its daily limit for this API (UTC day). | Wait for the next UTC day, or ask the Wazli team for a higher daily limit. |
too_many_requests | 429 | Too many calls in a minute; slow down. | Slow down: spread the calls out and try again after a few seconds. |
unavailable | 503 | The map service is unavailable right now; try again shortly. | A short outage on our side. Try again in a moment; your code should retry with a pause. |
When to try again
Try again later only for too_many_requests (after a few seconds), over_daily_limit (the next UTC day) and unavailable (after a short pause). Every other code needs a change first.