Closed cehbrecht closed 3 years ago
@jachym @gschwind @tomkralidis @ldesousa thoughts on this?
There are two kinds of exceptions. The InvalidParameterValue
etc exceptions are raised before the job is started:
https://github.com/geopython/pywps/blob/master/pywps/exceptions.py
These already return a HTTP code 400.
In our case the exception is raised after the job has started ... maybe in async mode. In this case we can only update the xml status document which is read via the nginx (or apache ...) file-service. I suppose in this case we don't have the chance to set the HTTP code. Right?
ping @huard @davidcaron
So, it might be an issue with the wps 1.0.0 protocol. This is probably different with wps 2.0.0 because the service has a GetStatus
request.
This will be fixed when move to the ogcapi rest-api.
Description
If an exception occurs in the execution of a process the wps exception report will be returned with http code 200: https://github.com/geopython/pywps/blob/20e1e254a3f7914e555fa89f363d1f6eb5f3895c/pywps/app/Process.py#L265
Is this indented or should we raise a
NoApplicableCode
exception with http code 400? https://github.com/geopython/pywps/blob/20e1e254a3f7914e555fa89f363d1f6eb5f3895c/pywps/exceptions.py#L28Environment
Steps to Reproduce
Raise an exception in the process, example: https://github.com/bird-house/emu/blob/master/emu/processes/wps_error.py
Additional Information
See PRs working on exceptions: #358, #406