Skip to content

Commit 359add2

Browse files
committed
Add failing command to Error dialog
1 parent f90aa86 commit 359add2

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

assets/webconfig/js/content_index.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,18 @@ $(document).ready(function () {
242242
$(window.hyperion).on("error", function (event) {
243243
//If we are getting an error "No Authorization" back with a set loginToken we will forward to new Login (Token is expired.
244244
//e.g.: hyperiond was started new in the meantime)
245-
if (event.reason.message == "No Authorization" && getStorage("loginToken")) {
245+
246+
const error = event.reason;
247+
248+
if (error?.message === "No Authorization" && getStorage("loginToken")) {
246249
removeStorage("loginToken");
247250
requestRequiresDefaultPasswortChange();
248251
} else {
249-
showInfoDialog("error", "", event.reason.message, event.reason.details);
252+
const errorDetails = [
253+
`Command: "${error?.cmd}"`,
254+
error?.details || "No additional details."
255+
];
256+
showInfoDialog("error", "", error?.message || "Unknown error", errorDetails);
250257
}
251258
});
252259

assets/webconfig/js/hyperion.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ function initWebSocket() {
131131
$(window.hyperion).trigger({
132132
type: "error",
133133
reason: {
134+
cmd: cmd,
134135
message: error,
135136
details: errorData.map((item) => item.description || "")
136137
}

0 commit comments

Comments
 (0)