mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-25 04:45:00 +00:00
QT: AutoUpdate - improvement message limit exceeded github (#2365)
This commit is contained in:
parent
46cbee1585
commit
78b4f10cc6
29 changed files with 126 additions and 2 deletions
|
@ -67,8 +67,20 @@ void CheckUpdate::CheckForUpdates(const bool showMessage) {
|
|||
|
||||
connect(reply, &QNetworkReply::finished, this, [this, reply, showMessage, updateChannel]() {
|
||||
if (reply->error() != QNetworkReply::NoError) {
|
||||
QMessageBox::warning(this, tr("Error"),
|
||||
QString(tr("Network error:") + "\n" + reply->errorString()));
|
||||
if (reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt() == 403) {
|
||||
QString response = reply->readAll();
|
||||
if (response.startsWith("{\"message\":\"API rate limit exceeded for")) {
|
||||
QMessageBox::warning(this, tr("Auto Updater"),
|
||||
tr("Error_Github_limit_MSG").replace("\\n", "\n"));
|
||||
} else {
|
||||
QMessageBox::warning(
|
||||
this, tr("Error"),
|
||||
QString(tr("Network error:") + "\n" + reply->errorString()));
|
||||
}
|
||||
} else {
|
||||
QMessageBox::warning(this, tr("Error"),
|
||||
QString(tr("Network error:") + "\n" + reply->errorString()));
|
||||
}
|
||||
reply->deleteLater();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue