Bug 1035296 - Make protocol.js pass error messages for unknownError (part 2); r=past

This commit is contained in:
Joe Walker 2014-08-04 12:26:41 +01:00
parent ae5b31eda5
commit 96ea1851be
2 changed files with 5 additions and 1 deletions

View File

@ -2070,6 +2070,10 @@ Requisition.prototype.exec = function(options) {
}
}
if (data != null && typeof data === 'string') {
data = data.replace(/^Protocol error: /, ''); // Temp fix for bug 1035296
}
data = (data != null && data.isTypedData) ? data : {
isTypedData: true,
data: data,

View File

@ -1112,7 +1112,7 @@ let Front = Class({
let message = (packet.error == "unknownError" && packet.message) ?
"Protocol error: " + packet.message :
packet.error;
deferred.reject(packet.error);
deferred.reject(message);
} else {
deferred.resolve(packet);
}