ENH: add http error msg

JIRA: STUDIO-7801

Change-Id: I0a8444f144022eaac9e6d11cfe783c39859fde60
Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
Stone Li 2024-12-24 16:20:19 +08:00 committed by Lane.Wei
parent 3ff3f31786
commit 928556826c
2 changed files with 10 additions and 1 deletions

View File

@ -4503,7 +4503,15 @@ void GUI_App::on_http_error(wxCommandEvent &evt)
m_show_error_msgdlg = false;
return;
}
}
else if (status == 400 && code == HttpErrorCertRevoked) {
if (!m_show_error_msgdlg) {
MessageDialog msg_dlg(nullptr, _L("Your software certificate has been revoked, please update Bambu Studio software."), "", wxAPPLY | wxOK);
m_show_error_msgdlg = true;
auto modal_result = msg_dlg.ShowModal();
m_show_error_msgdlg = false;
return;
}
}
// request login

View File

@ -29,6 +29,7 @@ enum HttpErrorCode
HttpErrorTimeout = 13,
HttpErrorResourcesExhaust = 14,
HttpErrorVersionLimited = 15,
HttpErrorCertRevoked = 101,
};
/// Represetns a Http request