Errors
In this guide, we look at what happens when a request fails. Check the status code of every response: anything outside the 2xx range is an error, and the body tells you what went wrong.
Error responses
Every error response is JSON, whatever Accept header you send, and has a human-readable message. Validation errors (422) also include an errors object with the messages for each invalid field:
422 Unprocessable Entity
{
"message": "The latitude field must not be greater than 90. (and 1 more error)",
"errors": {
"latitude": ["The latitude field must not be greater than 90."],
"longitude": ["The longitude field is required."]
}
}
Fields inside objects use dot notation, such as attributes.rating.
Status codes
Success codes
- Name
200- Description
OK. The request succeeded.
- Name
201- Description
Created. The resource was created and is returned in the response.
- Name
202- Description
Accepted. A bulk import was queued; poll it for progress.
- Name
204- Description
No Content. The resource was deleted. The response has no body.
Error codes
- Name
400- Description
Bad Request. The body is not valid JSON, for example because of a missing quote or a trailing comma.
- Name
401- Description
Unauthorized. The API key is missing, unknown, expired or inactive. See authentication.
- Name
403- Description
Forbidden. The API key lacks the permission this request needs, your team has no active plan, your team reached its POI limit, or you are creating an API key before verifying your email address.
- Name
404- Description
Not Found. The endpoint does not exist, or the resource does not exist in your team.
- Name
405- Description
Method Not Allowed. The endpoint exists but does not support this HTTP method.
- Name
422- Description
Unprocessable Entity. The request has invalid parameters or body fields. See
errorsfor details.
- Name
429- Description
Too Many Requests. Your team used its hourly quota, went over its per-minute burst cap, or, on routing, used its daily routing allowance (retry after
X-Routing-Reset). Otherwise, retry afterRetry-Afterseconds. See plans and limits.
Server errors
- Name
5xx- Description
Something went wrong on our side. These are rare; retry with backoff, and contact support if it persists.
- Name
502, 503- Description
On the routing endpoints: the routing service failed to answer (
502), or routing is not available or Lanewise's shared routing capacity is used up (503, withRetry-After). Retry after a moment.
Examples
400 Bad Request
{ "message": "The request body is not valid JSON: Syntax error." }
403 Forbidden
{ "message": "You do not have permission to create a point of interest." }
403 Forbidden (POI limit)
{ "message": "Your team has reached its limit of 1000 points of interest. Delete some or upgrade your plan." }
403 Forbidden (unverified email)
{ "message": "Verify your email address before creating API keys." }
404 Not Found
{ "message": "The requested point of interest was not found." }
429 Too Many Requests
{ "message": "Rate limit of 1000 requests per hour exceeded. Retry in 1260 seconds." }
429 Too Many Requests (burst cap)
{ "message": "Rate limit of 34 requests per minute exceeded. Retry in 18 seconds." }
429 Too Many Requests (routing allowance)
{ "message": "Your team has used its 400 routing calls for today. The allowance resets at midnight UTC; raise it with a bigger plan." }
503 Service Unavailable
{ "message": "Routing is busy right now. Please retry in a minute." }