Merge pull request #4048 from cp2004/improve/swupdate-error
Show meaningful message when software update is blocked
This commit is contained in:
2 files changed
+17
-6
No files matched your search
@@ -1086,10 +1086,14 @@ class SoftwareUpdatePlugin(
|
||||
and not self._settings.get_boolean(["ignore_throttled"])
|
||||
):
|
||||
# currently throttled, we refuse to run
|
||||
message = (
|
||||
"System is currently throttled, refusing to update "
|
||||
"anything due to possible stability issues"
|
||||
)
|
||||
self._logger.error(message)
|
||||
flask.abort(
|
||||
409,
|
||||
description="System is currently throttled, refusing to update "
|
||||
"anything due to possible stability issues",
|
||||
description=message,
|
||||
)
|
||||
|
||||
if self._printer.is_printing() or self._printer.is_paused():
|
||||
|
||||
@@ -680,13 +680,20 @@ $(function () {
|
||||
gettext("Updating, please wait.")
|
||||
);
|
||||
})
|
||||
.fail(function () {
|
||||
.fail(function (response) {
|
||||
self.updateInProgress = false;
|
||||
var message =
|
||||
"<p>" +
|
||||
gettext(
|
||||
"The update could not be started. Is it already active? Please consult octoprint.log for details."
|
||||
) +
|
||||
"</p><pre>" +
|
||||
_.escape(response.responseJSON.error) +
|
||||
"</pre>";
|
||||
|
||||
self._showPopup({
|
||||
title: gettext("Update not started!"),
|
||||
text: gettext(
|
||||
"The update could not be started. Is it already active? Please consult octoprint.log for details."
|
||||
),
|
||||
text: message,
|
||||
type: "error",
|
||||
hide: false,
|
||||
buttons: {
|
||||
|
||||
Reference in new issue
Block a user