Improve modal error message

This commit is contained in:
Oliver Walters 2020-11-02 23:02:02 +11:00
parent 500da8099b
commit f5d0d54ded

View File

@ -844,8 +844,13 @@ function launchModalForm(url, options = {}) {
$(modal).modal('hide'); $(modal).modal('hide');
// Permission denied! if (xhr.status == 0) {
if (xhr.status == 400) { // No response from the server
showAlertDialog(
"No Response",
"No response from the InvenTree server",
);
} else if (xhr.status == 400) {
showAlertDialog( showAlertDialog(
"Error 400: Bad Request", "Error 400: Bad Request",
"Server returned error code 400" "Server returned error code 400"