From 7db14bed8b737c56b73023d9b8087a8f7be817fe Mon Sep 17 00:00:00 2001 From: ayan4m1 Date: Sat, 15 Sep 2018 23:15:12 -0400 Subject: [PATCH] handle cases where single text exception message is returned --- resources/themes/pterodactyl/admin/settings/mail.blade.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/themes/pterodactyl/admin/settings/mail.blade.php b/resources/themes/pterodactyl/admin/settings/mail.blade.php index 3afacd783..b2ca70bd9 100644 --- a/resources/themes/pterodactyl/admin/settings/mail.blade.php +++ b/resources/themes/pterodactyl/admin/settings/mail.blade.php @@ -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) {