pacificclimate / data-prep-actions

Data Preparation actions - record of ephemera used to prepare data for PCIC data portals and other tools
0 stars 0 forks source link

If GetCapabilities call fails, skip rest of calls for that file #49

Closed corviday closed 3 years ago

corviday commented 3 years ago

The ncWMS test script makes three calls to ncWMS for each file. First it makes a GetCapabilities call to get metadata about the file, then it uses that metadata to make a GetMap and GetFatureInfo call. Previously, the script would try to extract metadata from the GetCapabilities call for the subsequent requests even if the GetCapabilities was a 400. This would throw an error that brougt the whole script to a stop on the first file, instead of being able to continue and get a full list of missing files.

This change moves the two subsequent calls inside the "success" branch of the GetCapabiklities call, so they don't happen if GetCapabilities fails.

Resolves #48