Skip to content

Commit d68079f

Browse files
committed
Check for missing layers in arcgis api response
1 parent d15a143 commit d68079f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

backend/lambda_functions/arcgis_loader/arcgis_loader.py

+4
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ def get_features(self) -> FeatureCollection: # type: ignore[override]
165165
LOGGER.debug(
166166
f"Service {url}/{service_name} reached, querying layers..."
167167
)
168+
response_json = r.json()
169+
if "layers" not in response_json.keys():
170+
LOGGER.warn("Layers not found in response. Skipping this service")
171+
continue
168172
layer_list = r.json()["layers"]
169173
for layer_name in layers:
170174
layer_ids = [

0 commit comments

Comments
 (0)