Status codes

7 posts / 0 new
Last post
Status codes

Is there a list of all the status codes for errors? I figure there is but I can't find it.

Today I got one that said it exceded the max length of the route, 12,000 miles.

Caused by an incorrect lat/lng, but I didn't have that status code in my error checking so no way to handle it.

So I'm thinking maybe it's time I got a list of all those codes and handle them. :)


The status codes for the
The status codes for the directions api can be found here.

I think it must be something

I think it must be something else then. Two that I can't find on that page are

a limit of 50 stops on a route

a max distance of a route being 12,000 miles


To clarify, these are

To clarify, these are returned when calling /directions/v2/route

To make it easier to explain,

To make it easier to explain, I reproduced my route length problem. This is what is returned:

    "route": {
        "routeError": {
            "message": "",
            "errorCode": 100
    "info": {
        "copyright": {
            "text": "© 2016 MapQuest, Inc.",
            "imageUrl": "",
            "imageAltText": "© 2016 MapQuest, Inc."
        "statuscode": 500,
        "messages": [
            "Exceeded maximum gross distance for locations (Max=12000.0, Actual=16900.5 miles)"


So I can see it is a status of 500. But there isn't a list of possible messages.

I can trap for this one particular message, and do something based on that ( like check if one of the lat/lng is a ridiculous distance from the others and tell the end user to check that location)
But the possible messages for this 500 status aren't documented, which makes it impossible until a new one happens for a user.

It's also sort of outdated if you look at the status codes documentation. It says 600-699 - Other error. That is a wide range to not document, and one of the examples is because the estimate route length exceeded the maximum allowed value, which is exactly what the 500 error is telling me.

It would be nice to have a list of all the possible error codes and messages, instead of getting a new one at the worst possible time.

Thanks for the suggestion. I
Thanks for the suggestion. I will forward this on to the directions team to investigate for a future update.

Thanks, that would be some

Thanks, that would be some useful info to have in the documentation. I'm not just trying to show an error, but figure out what the possible cause is. So having all the status infos would be great.