Skip to content

Commit

Permalink
Replace old error management with new the new errors for coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
talavis committed Aug 5, 2019
1 parent 5dd4ecf commit 6154963
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions backend/modules/browser/browser_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,11 @@ def get(self, dataset:str, datatype:str, item:str, ds_version:str=None):
dataset, ds_version = utils.parse_dataset(dataset, ds_version)
try:
ret = utils.get_coverage_pos(dataset, datatype, item, ds_version)
except ValueError:
logging.error('GetCoveragePos: unable to parse region ({})'.format(item))
self.send_error(status_code=400, reason='Unable to parse region')
except error.NotFoundError as err:
self.send_error(status_code=404, reason=str(err))
return
except (error.ParsingError, error.MalformedRequest) as err:
self.send_error(status_code=400, reason=str(err))
return

self.finish(ret)
Expand Down

0 comments on commit 6154963

Please sign in to comment.