mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
ENH: handle 403 error when sync the user settings
Change-Id: I33794d1f7354f369e76b83e90c8a03d2c349b545 Signed-off-by: Stone Li <stone.li@bambulab.com> (cherry picked from commit a5edb419b49b18e7fa94b05d14aa215ed756076c)
This commit is contained in:
parent
c05d42cc1c
commit
d6117788a8
1 changed files with 11 additions and 2 deletions
|
@ -3650,8 +3650,15 @@ void GUI_App::sync_preset(Preset* preset)
|
||||||
preset->setting_id.clear();
|
preset->setting_id.clear();
|
||||||
result = 0;
|
result = 0;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
result = m_agent->put_setting(preset->setting_id, preset->name, &values_map, &http_code);
|
result = m_agent->put_setting(preset->setting_id, preset->name, &values_map, &http_code);
|
||||||
|
if (http_code >= 400) {
|
||||||
|
result = 0;
|
||||||
|
updated_info = "hold";
|
||||||
|
BOOST_LOG_TRIVIAL(error) << "[sync_preset] put setting_id = " << preset->setting_id << " failed, http_code = " << http_code;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BOOST_LOG_TRIVIAL(trace) << "[sync_preset]update: can not generate differed key-values, we need to skip this preset "<< preset->name;
|
BOOST_LOG_TRIVIAL(trace) << "[sync_preset]update: can not generate differed key-values, we need to skip this preset "<< preset->name;
|
||||||
|
@ -3760,8 +3767,10 @@ void GUI_App::start_sync_user_preset(bool with_progress_dlg)
|
||||||
it = delete_cache_presets.erase(it);
|
it = delete_cache_presets.erase(it);
|
||||||
BOOST_LOG_TRIVIAL(trace) << "sync_preset: sync operation: delete success! setting id = " << del_setting_id;
|
BOOST_LOG_TRIVIAL(trace) << "sync_preset: sync operation: delete success! setting id = " << del_setting_id;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
|
BOOST_LOG_TRIVIAL(info) << "delete setting = " <<del_setting_id << " failed";
|
||||||
it++;
|
it++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue