forked from Alex/Pterodactyl-Panel
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) {
|
||||
console.error(jqXHR);
|
||||
var errorText;
|
||||
if (jqXHR.responseJSON.error) {
|
||||
if (!jqXHR.responseJSON) {
|
||||
errorText = jqXHR.responseText;
|
||||
} else if (jqXHR.responseJSON.error) {
|
||||
errorText = jqXHR.responseJSON.error;
|
||||
} else if (jqXHR.responseJSON.errors) {
|
||||
$.each(jqXHR.responseJSON.errors, function (i, v) {
|
||||
|
Loading…
Reference in New Issue
Block a user