---
title: "geoJSONDidError(error, geoJSON)"
framework: mapkitjs
role: symbol
role_heading: Interface Method
path: mapkitjs/geojsondelegate/geojsondiderror
---

# geoJSONDidError(error, geoJSON)

Indicates when the GeoJSON import fails.

## Declaration

```data
geoJSONDidError?(
    error: GeoJSONImportError | Error,
    geoJSON?: GeoJSONTypes.GeoJSON,
): void;
```

## Parameters

- `error`: An Error instance related to the last blocking error.
- `geoJSON`: The original parsed GeoJSON object.

## Discussion

Discussion MapKit JS calls this method when the GeoJSON fails to load.

## See Also

### Handling errors and completion

- [geoJSONDidComplete(result, geoJSON)](mapkitjs/geojsondelegate/geojsondidcomplete.md)
