<div dir="ltr">Hi,<div><br></div><div>We have a plugin that runs a background task to download some data from an external WFS service via QgsVectorLayer. The API is limited to 100 features per call, requiring us to page our requests, and to 600 calls a minute. </div><div><br></div><div>If we make too many calls per minute then we get HTTP 429 warnings in the OGR log and the download task terminates with incomplete data. The QgsVectorLayer and QgsVectorDataProvider return isValid() as False and featureCount() as -2, but hasErrors() is False and errors() is empty. This is no different than the call failing due to there being no data, so is no real use.</div><div><br></div><div>What I want is to be able to detect the 429 errors and implement a retry strategy, but there seems no way to access this info? Am I missing the obvious here? Or am I doomed to using urllib to make the calls manually?</div><div><br></div><div>Cheers!</div><div><br></div><div>John.</div><div><br></div></div>