Skip to content

Conversation

@eran-pinhas
Copy link
Contributor

As discussed at #442

  • I have already previously agreed to the PyWPS Contributions and Licensing Guidelines

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.8%) to 74.991% when pulling a0d4fe3 on eran-pinhas:issue-442 into c351a11 on geopython:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.8%) to 74.991% when pulling a0d4fe3 on eran-pinhas:issue-442 into c351a11 on geopython:master.

@cehbrecht
Copy link
Collaborator

@eran-pinhas @jachym technically this works. But I can't decide how the WPS protocol wants to have it. See my comments in #442.

@cehbrecht cehbrecht added this to the 4.4.0 milestone Jan 8, 2019
@cehbrecht
Copy link
Collaborator

cehbrecht commented Nov 14, 2019

@eran-pinhas @jachym @davidcaron I would like to solve this PR. I still don't know how to decide but from tests with Emu (dry-run process) I'm in favor of not merging.

Currently when I run a wrong wps request (missing parameter, etc) I get the following exception type:

<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd" version="1.0.0">
  <ows:Exception exceptionCode="NoApplicableCode" locator="">
    <ows:ExceptionText>Process failed, please check server error log</ows:ExceptionText>
  </ows:Exception>
</ows:ExceptionReport>

When something goes wrong within my process (for example using the dry-run exception in emu example), I get an exception in a status document:

<wps:ExecuteResponse xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 ../wpsExecute_response.xsd"
  service="WPS" version="1.0.0" xml:lang="en-US" serviceInstance="http://localhost:5000/wps?request=GetCapabilities&amp;amp;service=WPS" statusLocation="">
  <wps:Process wps:processVersion="1.5">
    <ows:Identifier>hello</ows:Identifier>
    <ows:Title>Say Hello</ows:Title>
    <ows:Abstract>Just says a friendly Hello. Returns a literal string output with Hello plus the inputed name.</ows:Abstract>
  </wps:Process>
  <wps:Status creationTime="2019-01-08T18:23:27Z">
    <wps:ProcessFailed>
      <wps:ExceptionReport>
        <ows:Exception exceptionCode="NoApplicableCode" locator="None">
          <ows:ExceptionText>Process failed, please check server error log</ows:ExceptionText>
        </ows:Exception>
      </wps:ExceptionReport>
    </wps:ProcessFailed>
  </wps:Status>
</wps:ExecuteResponse>

If I merge this PR I will only get the first exception type. Probably this is not what we want. Have I overseen something?

@davidcaron
Copy link
Contributor

@cehbrecht I think I agree with you, and the specification is a bit confusing.

Section 10.3.3 Execute exceptions:

When a WPS server encounters an error while performing an Execute operation, it shall
return an exception report message as specified in Subclause 8 of [OGC 06-121r3].

The response format of this section corresponds to what we would get if this PR gets merged. It seems to me that these exceptions are all raised before starting the process execution. (missing or invalid parameters, storage and queue problems, etc.) These exceptions seem to be more about "we couldn't start processing for some reason".

Section 10.3.1 Execute response parameters (Note d in Table 55)

If a process fails for some reason, the implementation raises an error and places it in the exception report included in this ProcessFailed structure.

The responses in table 55 are about the processing status, and a failed status is still a valid status.

So I think that the specs say that this PR should not be merged... but at the same time, I agree that a 200 status code containing an error message is not ideal.

@eran-pinhas
Copy link
Contributor Author

Hey guys, thank for your time trying to understand the WPS spec with me. We actually used your way of interpretation and didn't use the status code. And because I'm the only one cared for it I think we can close it and there will be no hard feelings 😁

@jachym
Copy link
Member

jachym commented Nov 17, 2019

thano you, @eran-pinhas for your contribution anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants