summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/drupal.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/misc/drupal.js b/misc/drupal.js
index cb650ac65..e71adda75 100644
--- a/misc/drupal.js
+++ b/misc/drupal.js
@@ -296,16 +296,16 @@ Drupal.getSelection = function (element) {
* Build an error message from ahah response.
*/
Drupal.ahahError = function (xmlhttp, uri) {
- if (xmlhttp.status == 200) {
+ if (xmlhttp.status == 200 || (xmlhttp.status == 500 && xmlhttp.statusText == 'Service unavailable (with message)')) {
if ($.trim(xmlhttp.responseText)) {
- var message = Drupal.t('An error occurred. \n@uri\n@text', { '@uri': uri, '@text': xmlhttp.responseText });
+ var message = Drupal.t("An error occurred. \nPath: @uri\nMessage: !text", { '@uri': uri, '!text': xmlhttp.responseText });
}
else {
- var message = Drupal.t('An error occurred. \n@uri\n(no information available).', { '@uri': uri });
+ var message = Drupal.t("An error occurred. \nPath: @uri\n(no information available).", {'@uri': uri });
}
}
else {
- var message = Drupal.t('An HTTP error @status occurred. \n@uri', { '@uri': uri, '@status': xmlhttp.status });
+ var message = Drupal.t("An HTTP error @status occurred. \nPath: @uri", { '@uri': uri, '@status': xmlhttp.status });
}
return message.replace(/\n/g, '<br />');
};