Data failed validation — invalid coordinates, a missing parameter, a malformed shape.
Code: VALIDATION_ERROR.
Example
thrownewGeoLeaf.Errors.ValidationError("Latitude must be between -90 and 90", { lat:95, lng: -73, expected:"Range: -90 to 90", });
// Targeted catch — around YOUR code that throws it, like the line above. // `GeoLeaf.Core.init()` never throws: a failed initialisation logs and returns `null`. try { checkCoordinates(95, -73); // your own validation, throwing the ValidationError above } catch (error) { if (errorinstanceofGeoLeaf.Errors.ValidationError) { console.error("Erreur de validation:", error.context); } }
Data failed validation — invalid coordinates, a missing parameter, a malformed shape.
Code:
VALIDATION_ERROR.Example