diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 3fd5593501..d9172510b6 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -4803,7 +4803,7 @@ void GUI_App::handle_http_error(unsigned int status, std::string body, const std void GUI_App::on_http_error(wxCommandEvent &evt) { int status = evt.GetInt(); - std::string provider = ORCA_CLOUD_PROVIDER; + std::string provider = ""; std::string body_str; // Extract provider and body from event data @@ -4845,7 +4845,7 @@ void GUI_App::on_http_error(wxCommandEvent &evt) // request login if (status == 401) { if (m_agent) { - if (m_agent->is_user_login(provider)) { + if (!provider.empty() && m_agent->is_user_login(provider)) { if (std::chrono::steady_clock::now() - m_last_401_error_time > 30s) { BOOST_LOG_TRIVIAL(warning) << "logout: http error 401."; this->request_user_logout(provider); diff --git a/src/slic3r/GUI/GUI_App.hpp b/src/slic3r/GUI/GUI_App.hpp index 6a5dd0315d..5b6bcc6581 100644 --- a/src/slic3r/GUI/GUI_App.hpp +++ b/src/slic3r/GUI/GUI_App.hpp @@ -494,7 +494,7 @@ public: void request_open_project(std::string project_id); void request_remove_project(std::string project_id); - void handle_http_error(unsigned int status, std::string body, const std::string& provider = ORCA_CLOUD_PROVIDER); + void handle_http_error(unsigned int status, std::string body, const std::string& provider = ""); void on_http_error(wxCommandEvent &evt); void on_update_machine_list(wxCommandEvent& evt); void on_user_login(wxCommandEvent &evt);