fix client crash when server goes down during registration (#5787)

This commit is contained in:
ebbit1q 2025-04-12 05:01:14 +02:00 committed by GitHub
parent 3b758962e4
commit 9463390e80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View file

@ -574,6 +574,9 @@ void MainWindow::registerError(Response::ResponseCode r, QString reasonStr, quin
case Response::RespRegistrationFailed:
QMessageBox::critical(this, tr("Error"), tr("Registration failed for a technical problem on the server."));
break;
case Response::RespNotConnected:
QMessageBox::critical(this, tr("Error"), tr("The connection to the server has been lost."));
break;
default:
QMessageBox::critical(this, tr("Error"),
tr("Unknown registration error: %1").arg(static_cast<int>(r)) +