Generic data failure — a malformed payload or a parse that did not complete.
Code: DATA_ERROR. The catch-all of the data family: prefer POIError or RouteError when the subject is known.
DATA_ERROR
throw new GeoLeaf.Errors.DataError("Invalid data structure", { source: "api/response", expected: "array", received: typeof data,}); Copy
throw new GeoLeaf.Errors.DataError("Invalid data structure", { source: "api/response", expected: "array", received: typeof data,});
Returns a string representation of an object.
Generic data failure — a malformed payload or a parse that did not complete.
Code:
DATA_ERROR. The catch-all of the data family: prefer POIError or RouteError when the subject is known.Example