Bug report #2891

WFS exceptions not handled by plugin

Added by Sandro Santilli almost 14 years ago. Updated almost 14 years ago.

Status:Closed
Priority:Low
Assignee:Tim Sutton
Category:C++ Plugins
Affected QGIS version: Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:12951

Description

The WFS plugin doesn't seem to handle WFS exceptions thrown by ows server on getCapabilities request

ExceptionText_on_GetCapabilities.patch Magnifier (774 Bytes) Sandro Santilli, 2010-07-19 01:38 AM

exception2.patch Magnifier (1.73 KB) Sandro Santilli, 2010-07-19 02:39 AM

History

#1 Updated by Sandro Santilli almost 14 years ago

The patch (apply from within src/plugins/wfs) handles presence of an ExceptionText tag as a sign of an exception. It is probably too wide and fails when server doesn't send that.
Didn't check standard document either. All I can tell is that this patch helps when trying
to connect to the WFS server exposed by Drupal WFS server... (ie: handle with care)

#2 Updated by Marco Hugentobler almost 14 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Applied in a0c29c5b (SVN r13936). Thanks!

#3 Updated by Sandro Santilli almost 14 years ago

  • Status changed from Closed to Feedback
  • Resolution deleted (fixed)

Wanted to make the check a bit smarter by only looking at the first tag rather than
searching in the whole document. It should be faster when no exception is returned.
Anyway, can send a new patch against trunk.

#4 Updated by Sandro Santilli almost 14 years ago

The new patch (exception2.patch) only inspects the first node in the returned XML to tell if it's an exception or not. This makes it faster in successful cases.

Also the patch gives more information (exceptionCode) and keeps the error window title to "Error" to give better visibility to other error messages (parsing error and connection error)

#5 Updated by Marco Hugentobler almost 14 years ago

  • Resolution set to fixed
  • Status changed from Feedback to Closed

Applied second patch in e357842e (SVN r13957). Thanks!

Also available in: Atom PDF