mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
More descriptive error messages when arcgis rest calls fail
This commit is contained in:
parent
100a14ed32
commit
724102563d
@ -521,7 +521,15 @@ QVariantMap QgsArcGisRestUtils::queryServiceJSON( const QUrl &url, QString &erro
|
||||
QgsDebugMsg( QStringLiteral( "Parsing error: %1" ).arg( err.errorString() ) );
|
||||
return QVariantMap();
|
||||
}
|
||||
return doc.object().toVariantMap();
|
||||
const QVariantMap res = doc.object().toVariantMap();
|
||||
if ( res.contains( QStringLiteral( "error" ) ) )
|
||||
{
|
||||
const QVariantMap error = res.value( QStringLiteral( "error" ) ).toMap();
|
||||
errorText = error.value( QStringLiteral( "message" ) ).toString();
|
||||
errorTitle = QObject::tr( "Error %1" ).arg( error.value( QStringLiteral( "code" ) ).toString() );
|
||||
return QVariantMap();
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
std::unique_ptr<QgsSymbol> QgsArcGisRestUtils::parseEsriSymbolJson( const QVariantMap &symbolData )
|
||||
|
Loading…
x
Reference in New Issue
Block a user