mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-29 15:34:44 +02:00
handle cases where single text exception message is returned
This commit is contained in:
parent
3a45bc1986
commit
7db14bed8b
@ -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…
x
Reference in New Issue
Block a user