<div dir="ltr"><div>Hi list</div><div><br></div><div>When loading a vector layer via Python, is there a way to get a hold of the error message for when the loading fails?</div><div><br></div><div>I can check if the layer is valid or not, but I'd like to get a description of the error. I see the error on the QGIS log panel, so I'm hoping it is possible to access it from Python.</div><div><br></div><div>```</div><div># a sample of my code</div><div>layer = QgsVectorLayer("some-bogus-url", "mylayer", "WFS")</div><div>layer.isValid()  # this returns False</div><div>```</div><div><br></div><div>Thanks in advance!<br></div><div><br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">___________________________ ___ __<br>Ricardo Garcia Silva</div></div></div>