Skip to content

Commit

Permalink
safeguard ES index errors on queryables (#812)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed Nov 10, 2021
1 parent 38cd872 commit 8740b23
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pygeoapi/provider/elasticsearch_.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ def get_fields(self):
LOGGER.debug('ES index looks generated by GDAL')
self.is_gdal = True
p = ii[self.index_name]['mappings']
except IndexError:
LOGGER.warning('could not get fields; returning empty set')
return {}

for k, v in p['properties'].items():
if 'type' in v:
Expand Down

0 comments on commit 8740b23

Please sign in to comment.