MCPcopy Create free account
hub / github.com/MultiMC/Launcher / onRefreshError

Method onRefreshError

libraries/katabasis/src/DeviceFlow.cpp:418–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

416}
417
418void DeviceFlow::onRefreshError(QNetworkReply::NetworkError error, QNetworkReply *refreshReply) {
419 QString errorString = "No Reply";
420 if(refreshReply) {
421 timedReplies_.remove(refreshReply);
422 errorString = refreshReply->errorString();
423 }
424
425 switch (error)
426 {
427 // used for invalid credentials and similar errors. Fall through.
428 case QNetworkReply::AuthenticationRequiredError:
429 case QNetworkReply::ContentAccessDenied:
430 case QNetworkReply::ContentOperationNotPermittedError:
431 case QNetworkReply::ProtocolInvalidOperationError:
432 updateActivity(Activity::FailedHard);
433 break;
434 case QNetworkReply::ContentGoneError: {
435 updateActivity(Activity::FailedGone);
436 break;
437 }
438 case QNetworkReply::TimeoutError:
439 case QNetworkReply::OperationCanceledError:
440 case QNetworkReply::SslHandshakeFailedError:
441 default:
442 updateActivity(Activity::FailedSoft);
443 return;
444 }
445 if(refreshReply) {
446 refreshReply->deleteLater();
447 }
448 qDebug() << "DeviceFlow::onRefreshFinished: Error" << (int)error << " - " << errorString;
449}
450
451}

Callers

nothing calls this directly

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected