Bug report #22052

Bad error message on WFS connection fail

Added by Jonathan Moules almost 5 years ago. Updated almost 5 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Web Services clients/WFS
Affected QGIS version:3.4.3 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:29866

Description

I was trying to connect to a WFS but my firewall was blocking QGIS.

I expect QGIS to come back with a meaningful message, but instead I get back:
"unexpected[sic] end of file"

This is meaningless to an end user. It's also clearly erroring out at the wrong place - something should be catching the lack of connection well before it ever tries to parse the getcap.

History

#1 Updated by Jonathan Moules almost 5 years ago

You get a bad message if you request the wrong type of service.

Use this for WFS:
http://ags.kr-plzensky.cz/arcgis/services/UPD/Stod/MapServer/WmsServer

You'll get back an exception:
"<ServiceException code="InvalidFormat">Can't recognize service requested.</ServiceException>"

but QGIS represents this as:
"Service contains no layers" - which is less useful and certainly less correct than passing on the exception message

Also available in: Atom PDF