Catch ajax status errors and display

This commit is contained in:
phl0
2024-07-25 18:35:33 +02:00
parent 519f76cb9a
commit 94fa8b6e47

View File

@@ -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 @@
<?php include 'includes/interface_assets/footer.php'; ?>
</html>
</html>