Commit 99b64a88 authored by Volker Krause's avatar Volker Krause
Browse files

Don't consider failed geofence zone retrieval fatal

There's at least one provider claiming to have geofence zones but then
replies with 404 when asking for it.
parent 8c5cecce
......@@ -206,18 +206,23 @@ void GBFSJob::fetchFinished(QNetworkReply *reply, GBFS::FileType type)
{
reply->deleteLater();
--m_pendingJobs;
const auto state = m_state; // can change as part of processing
if (reply->error() != QNetworkReply::NoError) {
handleNetworkError(reply);
return;
}
const auto doc = QJsonDocument::fromJson(reply->readAll());
if (m_store.isValid()) {
m_store.storeData(type, doc);
// don't consider geofencing_zones failure fatal
if (type != GBFS::GeofencingZones) {
handleNetworkError(reply);
return;
} else {
qDebug() << reply->url() << reply->errorString();
}
} else {
const auto doc = QJsonDocument::fromJson(reply->readAll());
if (m_store.isValid()) {
m_store.storeData(type, doc);
}
parseData(doc, type);
}
const auto state = m_state; // can change as part of processing
parseData(doc, type);
if (m_pendingJobs == 0 && state == State::Data) {
finalize();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment