From 94fa8b6e47a90bbc9ef942e36b7fe3badf3488e5 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 25 Jul 2024 18:35:33 +0200 Subject: [PATCH] Catch ajax status errors and display --- install/run.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/install/run.php b/install/run.php index c0ca19d92..c376cbeba 100644 --- a/install/run.php +++ b/install/run.php @@ -94,7 +94,13 @@ $("#success_button").show(); } } catch (error) { - $("#error_message").text("Installation failed: " + error).show(); + var errormsg = ''; + if (typeof error === 'object') { + errormsg = error.statusText; + } else { + errormsg = error; + } + $("#error_message").text("Installation failed: " + errormsg).show(); } }); @@ -376,4 +382,4 @@ - \ No newline at end of file +