cedadev / flamingo

Flamingo WPS
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Process Errors are not sent back to user #16

Open agstephens opened 3 years ago

agstephens commented 3 years ago

E.g.:

more /gws/nopw/j04/ceda_wps/birds/test/tmp/flamingo/pywps_process_wkuruixb/job-error.txt
/usr/local/anaconda/envs/flamingo/lib/python3.7/site-packages/ceda_wps_assets/flamingo.py:13: YAMLLoadWarning:
 calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://ms
g.pyyaml.org/load for full details.
  resp = yaml.load(open(dset_assets_file))
Traceback (most recent call last):
  File "/usr/local/anaconda/envs/flamingo/lib/python3.7/site-packages/pywps/app/Process.py", line 248, in _run
_process
    self.handler(wps_request, wps_response)  # the user must update the wps_response.
  File "/usr/local/anaconda/envs/flamingo/lib/python3.7/site-packages/flamingo/processes/_wps_subset_base.py",
 line 204, in _handler
    results = subset(**inputs)
  File "/usr/local/anaconda/envs/flamingo/lib/python3.7/site-packages/daops/ops/subset.py", line 77, in subset
    result_set = Subset(**locals()).calculate()
  File "/usr/local/anaconda/envs/flamingo/lib/python3.7/site-packages/daops/ops/base.py", line 88, in calculat
e
    process(self.get_operation_callable(), norm_collection, **self.params),
  File "/usr/local/anaconda/envs/flamingo/lib/python3.7/site-packages/daops/processor.py", line 19, in process
    result = operation(dset, **kwargs)
  File "/usr/local/anaconda/envs/flamingo/lib/python3.7/site-packages/clisops/ops/subset.py", line 191, in sub
set
    return op.process()
  File "/usr/local/anaconda/envs/flamingo/lib/python3.7/site-packages/clisops/ops/base_operation.py", line 89,
 in process
    processed_ds = self._calculate()
  File "/usr/local/anaconda/envs/flamingo/lib/python3.7/site-packages/clisops/ops/subset.py", line 73, in _cal
culate
    ds = check_lon_alignment(self.ds, self.params.get("lon_bnds"))
  File "/usr/local/anaconda/envs/flamingo/lib/python3.7/site-packages/clisops/utils/dataset_utils.py", line 65
, in check_lon_alignment
    f"The requested longitude subset {lon_bnds} is not within the longitude bounds "
Exception: The requested longitude subset (-14.0, 4.0) is not within the longitude bounds of this dataset and
the data could not be converted to this longitude frame successfully. Please re-run your request with longitud
es within the bounds of the dataset: (-13.01, 3.55)

Need to get process errors sent back to users of the CEDA WPS UI - so they can work out how to respond.