handle cases where single text exception message is returned
This commit is contained in:
parent
3a45bc1986
commit
7db14bed8b
1 changed files with 3 additions and 1 deletions
|
@ -159,7 +159,9 @@
|
||||||
function showErrorDialog(jqXHR, verb) {
|
function showErrorDialog(jqXHR, verb) {
|
||||||
console.error(jqXHR);
|
console.error(jqXHR);
|
||||||
var errorText;
|
var errorText;
|
||||||
if (jqXHR.responseJSON.error) {
|
if (!jqXHR.responseJSON) {
|
||||||
|
errorText = jqXHR.responseText;
|
||||||
|
} else if (jqXHR.responseJSON.error) {
|
||||||
errorText = jqXHR.responseJSON.error;
|
errorText = jqXHR.responseJSON.error;
|
||||||
} else if (jqXHR.responseJSON.errors) {
|
} else if (jqXHR.responseJSON.errors) {
|
||||||
$.each(jqXHR.responseJSON.errors, function (i, v) {
|
$.each(jqXHR.responseJSON.errors, function (i, v) {
|
||||||
|
|
Loading…
Reference in a new issue