Description
Hey,
I believe there's an issue with the status code. when the handler itself raises an error the Process.py catches it (lines below) sets the wps_request as failed (attached below) but then continues like no error occurred. As result the status code of the HTTP request is 200 and should be 500
|
wps_response._update_status(WPS_STATUS.FAILED, msg, 100) |
I can think of 2 solutions:
What do you guys think? @cehbrecht @jachym
Environment
- operating system: ubuntu 18
- Python version: 3.6
- PyWPS version: latest from github
- source/distribution: git clone
- web server: Flask
Description
Hey,
I believe there's an issue with the status code. when the handler itself raises an error the Process.py catches it (lines below) sets the wps_request as failed (attached below) but then continues like no error occurred. As result the status code of the HTTP request is 200 and should be 500
pywps/pywps/app/Process.py
Line 232 in ec1d90f
I can think of 2 solutions:
return response(Service.py#L326) check whether the response is failed one and if so raise an NoApplicableCode that will be catched at Service.py#L335What do you guys think? @cehbrecht @jachym
Environment