mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-05 22:14:59 +02:00
[ticket/13771] Allow AJAX errors to support exceptions messages
PHPBB3-13771
This commit is contained in:
parent
c46024bfa2
commit
4a7f905c6a
@ -263,7 +263,11 @@ phpbb.ajaxify = function(options) {
|
|||||||
}
|
}
|
||||||
phpbb.clearLoadingTimeout();
|
phpbb.clearLoadingTimeout();
|
||||||
var errorText = false;
|
var errorText = false;
|
||||||
if (typeof errorThrown === 'string' && errorThrown.length > 0) {
|
var responseText = $.parseJSON(jqXHR.responseText);
|
||||||
|
if (typeof responseText.message === 'string' && responseText.message.length > 0) {
|
||||||
|
errorText = responseText.message;
|
||||||
|
}
|
||||||
|
else if (typeof errorThrown === 'string' && errorThrown.length > 0) {
|
||||||
errorText = errorThrown;
|
errorText = errorThrown;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user