mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1045581 - [MobileID] The Mobile ID flow can't be completed with a manually inserted phone number. r=spenrose
This commit is contained in:
parent
f85cc1ea84
commit
8c7cbd6354
@ -35,7 +35,7 @@ this.MobileIdentityClient = function(aServerUrl) {
|
||||
throw new Error(ERROR_INTERNAL_HTTP_NOT_ALLOWED);
|
||||
}
|
||||
|
||||
this.hawk = new HawkClient(SERVER_URL);
|
||||
this.hawk = new HawkClient(serverUrl);
|
||||
this.hawk.observerPrefix = "MobileId:hawk";
|
||||
};
|
||||
|
||||
@ -135,13 +135,17 @@ this.MobileIdentityClient.prototype = {
|
||||
(response) => {
|
||||
log.debug("MobileIdentityClient -> response.body " + response.body);
|
||||
try {
|
||||
let responseObj = JSON.parse(response.body);
|
||||
let responseObj;
|
||||
// We parse the response body unless we are handling a 204 response,
|
||||
// which MUST NOT include a message body.
|
||||
if (response.status != 204) {
|
||||
responseObj = JSON.parse(response.body);
|
||||
}
|
||||
deferred.resolve(responseObj);
|
||||
} catch (err) {
|
||||
deferred.reject({error: err});
|
||||
}
|
||||
},
|
||||
|
||||
(error) => {
|
||||
log.error("MobileIdentityClient -> Error ${}", error);
|
||||
deferred.reject(SERVER_ERRNO_TO_ERROR[error.errno] || ERROR_UNKNOWN);
|
||||
|
Loading…
Reference in New Issue
Block a user