INSPIRE-MIF / helpdesk-validator

Community discussion forum for INSPIRE validation issues
41 stars 22 forks source link

WMS tests failing with "server experienced a several unexpected error" #921

Open JohannaOtt opened 1 year ago

JohannaOtt commented 1 year ago

This is a follow up ticket of https://github.com/INSPIRE-MIF/helpdesk-validator/issues/496, so there might be some useful input there as well.

iuriemaxim commented 1 year ago

Dear @JohannaOtt

The response provided by the service with wrong parameters is not according to the WMS standard. Below it is an example of such a request to the service:

https://inspire-hessen.de/raster/wms/dop20-v4/ows?BBOX=zzzz&CRS=zzzz&FORMAT=zzzz&HEIGHT=zzzz&LAYERS=zzzz&REQUEST=GetMap&SERVICE=WMS&STYLES=zzzz&VERSION=1.3.0&WIDTH=zzzz

The response of the server is "internal error".

However the standard clearly mentions that the response of the server should be an XML, that should validate according to a schema, even if the user is providing wrong parameters in the request.

Indeed the INSPIRE validator is not providing a clear error message for a developer of a custom WMS, to know what to fix, and I do not expect that such a clear message useful for debugging to be easy to be provided by the validator. I do not think that the validator should become a debugger to identify all potential problems that could be encountered in a custom development. Even Microsoft and ESRI have an "unknown errror" message and even the WMS that was developed provides an "internal error" without providing any further information.

But indeed the error message "The server experienced a several unexpected error. Please, try again later. If the problem persist, please contact with the helpdesk." is vague and incorrect, as the message should inform the the user that if the problem persist it means that the service has an unknown error. Therefore heldesk should not be contacted but the service should be fixed.

The OGC WMS standard 1.3.0 states in Annex E:

"Individual error messages appear as ServiceException elements within the ServiceExceptionReport element."

"The schema may also be found on-line at http://schemas.opengis.net/wms/1.3.0/. Service exception XML shall be valid according to this service exception schema."

https://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd

Response should look like in the image below

https://user-images.githubusercontent.com/20813598/107204667-9b6e2600-6a05-11eb-8d56-898ede5d66c7.png

Therefore it can be considered as "user to fix" as the message provided by the WMS is unclear (internal error), so why should be the message from the Validator more clear?

If the validator could test all such responses of the web services, it would be great, but with a significant effort, namely time and money.

So, somwere should exist a limit of what the validator should test and provide a clear message and where an "unknown error" should be enough to let the user know that something is wrong in the web service and cant be (easily) determined.

But in any case the error message providedby the validator should be changed to i dicate that an unknowm error exist in the service, not in the validator.

Hope it helps, Iurie

JohannaOtt commented 1 year ago

The response of the server is "internal error". However the standard clearly mentions that the response of the server should be an XML, that should validate according to a schema, even if the user is providing wrong parameters in the request.

True, thanks for checking, did miss that one.

Indeed the INSPIRE validator is not providing a clear error message for a developer of a custom WMS, to know what to fix, and I do not expect that such a clear message useful for debugging to be easy to be provided by the validator.

I think a message similar to the one EID56fffaf2-4ef9-4206-968b-8f5427f5f076 is throwing ("A GetMap was requested using parameter 'VERSION' with an invalid value and the service did not throw an exception.") would be sufficient. Then developers at least know that they need to start from a request with a wrong/missing value for parameter X.

Therefore it can be considered as "user to fix" as the message provided by the WMS is unclear (internal error), so why should be the message from the Validator more clear?

To me, the error message is very clear indicating that one should contact the helpdesk. If you want to avoid analysing such issues, I would still propose to change that message.

So, somwere should exist a limit of what the validator should test and provide a clear message and where an "unknown error" should be enough to let the user know that something is wrong in the web service and cant be (easily) determined.

As pointed out before, I would wish for at least a hint that it is about wrong behavior on wrong requests. The INSPIRE validator still has many errors, so IMO an unknown error will lead to the users trying to find out what is wrong with the validator (and end up creating issues here) .

fabiovinci commented 1 year ago

Dear all,

we will analyze the tests that provide the generic error message and try to improve them.

JohannaOtt commented 5 days ago

The response of the server is "internal error". However the standard clearly mentions that the response of the server should be an XML, that should validate according to a schema, even if the user is providing wrong parameters in the request.

True, thanks for checking, did miss that one.

This WMS is returning an XML with the expected exception when sending a wrong request but the validator is still showing the "The server experienced a several unexpected error. Please, try again later. If the problem persist, please contact with the helpdesk." error. Report attached Test run on 11_12 - 03.07.2024 with test suite Conformance Class View Service WMS.html.zip

So it seems that this error is not only caused by services returning unexpected exception messages.

As long as there is no more meaningful error message: Could you please check why that WMS is failing the getmap-default-parameters and the at58-getmap-transparent-parameter tests?