Skip to content
Permalink
Browse files
[WFS provider] Accept 'code' attribute in ExceptionReport (fixes #42196)
  • Loading branch information
rouault authored and nyalldawson committed May 21, 2021
1 parent 7a239f8 commit d1d3da161d72d5701c2b12ab80d470022960b0e6
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/providers/wfs/qgswfsprovider.cpp
@@ -1982,8 +1982,12 @@ void QgsWFSProvider::handleException( const QDomDocument &serverResponse )
if ( exceptionElem.tagName() == QLatin1String( "ExceptionReport" ) )
{
QDomElement exception = exceptionElem.firstChildElement( QStringLiteral( "Exception" ) );
// The XML schema at http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd uses
// the "exceptionCode" attribute, but http://docs.opengeospatial.org/is/04-094r1/04-094r1.html#36
// mentions "code". Accept both...
pushError( tr( "WFS exception report (code=%1 text=%2)" )
.arg( exception.attribute( QStringLiteral( "exceptionCode" ), tr( "missing" ) ),
.arg( exception.attribute( QStringLiteral( "exceptionCode" ),
exception.attribute( QStringLiteral( "code" ), tr( "missing" ) ) ),
exception.firstChildElement( QStringLiteral( "ExceptionText" ) ).text() )
);
return;

0 comments on commit d1d3da1

Please sign in to comment.