refactor: check for last response error
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
parent
d48c3f5f60
commit
db3ffaf658
1 changed files with 6 additions and 2 deletions
|
|
@ -196,7 +196,7 @@ frappe.setup.SetupWizard = class SetupWizard extends frappe.ui.Slides {
|
|||
this.abort_setup(r.message.fail);
|
||||
}
|
||||
},
|
||||
error: () => this.abort_setup("Error in setup"),
|
||||
error: () => this.abort_setup(),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -213,7 +213,11 @@ frappe.setup.SetupWizard = class SetupWizard extends frappe.ui.Slides {
|
|||
|
||||
abort_setup(fail_msg) {
|
||||
this.$working_state.find(".state-icon-container").html("");
|
||||
fail_msg = fail_msg ? fail_msg : __("Failed to complete setup");
|
||||
fail_msg = fail_msg
|
||||
? fail_msg
|
||||
: frappe.last_response.setup_wizard_failure_message
|
||||
? frappe.last_response.setup_wizard_failure_message
|
||||
: __("Failed to complete setup");
|
||||
|
||||
this.update_setup_message("Could not start up: " + fail_msg);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue