Incorrect error code being returned

Hi,

I was trying to find cycling-regular route between Seoul (South Korea) and Tokyo (Japan) with the restriction to avoid ferries.

"options": {
        "avoid_features": [
            "ferries"
        ]
    }

My intention was to look for the http response code and error code which produced “no routes found”.

However, I received :

"error": {
        "code": 2004,
        "message": "Request parameters exceed the server configuration limits. By dynamic weighting, the approximated distance of a route segment must not be greater than 300000.0 meters."
    }

This response code is incorrect I think considering the fact that the distance between Seoul and Tokyo is less than 1900km including ferry distance.

Well, it’s quite a bit further than 300 km, currently our limit for dynamic avoidables. In a few weeks we can relax that restriction, then we’ll have a super-fast algo.

Which error is thrown is more a sequential event. In this case, it seems it first checks whether the route seems to be longer than 300 km. Can’t remember how it’s done, but might be a as-the-crow-flies kinda calculation.

A route not found error has 404 with some internal error code provided. We used to document them, but apparently they’re not anymore… Good point though. @adam are they documented somewhere right now? Couldn’t find it.

Oh I’m so sorry. I missed a zero. I thought the max limit for dynamic avoidables was 3000km and not 300km. My bad.

I found the error codes here :
They are not updated and clear though. I had to figure out by trial and error which error code comes with which http code.