summaryrefslogtreecommitdiffstats
path: root/extensions/MyDashboard/web/js
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2014-02-12 06:12:17 +0100
committerByron Jones <bjones@mozilla.com>2014-02-12 06:12:17 +0100
commit3fecb5fbc0e8f4305bb626d58de6e0c47a862d05 (patch)
tree1dec839a1ca3d2d7ea08441dd6abc1a89b197f45 /extensions/MyDashboard/web/js
parenta1da4205492830a812f5661ee3b4faa224844b85 (diff)
downloadbugzilla-3fecb5fbc0e8f4305bb626d58de6e0c47a862d05.tar.gz
bugzilla-3fecb5fbc0e8f4305bb626d58de6e0c47a862d05.tar.xz
Bug 967910: "IO request failed : undefined" on My Dashboard
Diffstat (limited to 'extensions/MyDashboard/web/js')
-rw-r--r--extensions/MyDashboard/web/js/flags.js25
-rw-r--r--extensions/MyDashboard/web/js/query.js17
2 files changed, 38 insertions, 4 deletions
diff --git a/extensions/MyDashboard/web/js/flags.js b/extensions/MyDashboard/web/js/flags.js
index 283a16434..0fcf75618 100644
--- a/extensions/MyDashboard/web/js/flags.js
+++ b/extensions/MyDashboard/web/js/flags.js
@@ -38,8 +38,11 @@ YUI({
}
},
failure: function(o) {
- var resp = o.responseText;
- alert("IO request failed : " + resp);
+ if (o.error) {
+ alert("Failed to load flag list from Bugzilla:\n\n" + o.error.message);
+ } else {
+ alert("Failed to load flag list from Bugzilla.");
+ }
}
};
@@ -120,6 +123,15 @@ YUI({
// Requestee
dataSource.requestee = new Y.DataSource.IO({ source: 'jsonrpc.cgi' });
+ dataSource.requestee.on('error', function(e) {
+ try {
+ var response = Y.JSON.parse(e.data.responseText);
+ if (response.error)
+ e.error.message = response.error.message;
+ } catch(ex) {
+ // ignore
+ }
+ });
dataTable.requestee = new Y.DataTable({
columns: [
{ key: "requester", label: "Requester", sortable: true },
@@ -160,6 +172,15 @@ YUI({
// Requester
dataSource.requester = new Y.DataSource.IO({ source: 'jsonrpc.cgi' });
+ dataSource.requester.on('error', function(e) {
+ try {
+ var response = Y.JSON.parse(e.data.responseText);
+ if (response.error)
+ e.error.message = response.error.message;
+ } catch(ex) {
+ // ignore
+ }
+ });
dataTable.requester = new Y.DataTable({
columns: [
{ key:"requestee", label:"Requestee", sortable:true,
diff --git a/extensions/MyDashboard/web/js/query.js b/extensions/MyDashboard/web/js/query.js
index cf716fbe3..fe7c00b17 100644
--- a/extensions/MyDashboard/web/js/query.js
+++ b/extensions/MyDashboard/web/js/query.js
@@ -63,8 +63,11 @@ YUI({
}
},
failure: function(o) {
- var resp = o.responseText;
- alert("IO request failed : " + resp);
+ if (o.error) {
+ alert("Failed to load bug list from Bugzilla:\n\n" + o.error.message);
+ } else {
+ alert("Failed to load bug list from Bugzilla.");
+ }
}
};
@@ -113,6 +116,16 @@ YUI({
}
});
+ dataSource.on('error', function(e) {
+ try {
+ var response = Y.JSON.parse(e.data.responseText);
+ if (response.error)
+ e.error.message = response.error.message;
+ } catch(ex) {
+ // ignore
+ }
+ });
+
dataTable = new Y.DataTable({
columns: [
{ key: Y.Plugin.DataTableRowExpansion.column_key, label: ' ', sortable: false },