From a08ae296a52df80bb71f6fcfc48586ba130f2898 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 8 Sep 2016 11:11:10 +0200 Subject: [roomplanner] ajax saving: Better error messages on .fail() --- modules-available/roomplanner/js/init.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules-available/roomplanner/js/init.js b/modules-available/roomplanner/js/init.js index 83f94390..39bfefce 100644 --- a/modules-available/roomplanner/js/init.js +++ b/modules-available/roomplanner/js/init.js @@ -42,8 +42,8 @@ function initRoomplanner() { return; } $('#error-msg').text('Error: ' + data).show(); - }).fail(function () { - $('#error-msg').text('AJAX save call failed').show(); + }).fail(function (jq, textStatus, errorThrown) { + $('#error-msg').text('AJAX save call failed: ' + textStatus + ' (' + errorThrown + ')').show(); }).always(function() { $('#saveBtn').prop('disabled', false); $('#saving-msg').hide(); -- cgit v1.2.3-55-g7522