The route response may include various notices that indicate errors or warnings about the route calculation.
In this section of the Developer Guide, we highlight some of the key features of notices. For full details on notices, see the specification at Routing API.
The notices may appear at different levels of the response:
These notices appear at the top level of the response, and generally indicate a high level failure, e.g., a
noRouteFound notice indicates that route calculation failed because no route was found.
These notices appear at the
section level within a
route and generally indicate some issue with the route produced. The majority of these route section notices indicate that the calculated route could not avoid, and thus violates some specific restriction (e.g.,
violatedVehicleRestriction), or violates a requested option (e.g.,
code is an enumerated string that indicates the type of notice.
This field is a human-readable string equivalent to
noRouteFound- "Route calculation failed : Couldn't find a route."
violatedVehicleRestriction- "Violated vehicle restriction"
severity is an enumerated string that indicates how serious the issue is.
If a route is provided with section notice(s) of
critical severity, this route must be rejected and not used. Such routes might only ever be used if these specific restriction violations and their impact have been thoroughly evaluated. For example, the drivers may hold a permit that allows them to violate certain restrictions.
details attribute is an object that provides additional details about the notice. For example,
violatedVehicleRestriction notices include details about the restriction that was violated.
For a sample request that demonstrates how to get notices, see this tutorial: