Include url in http response logging

Otherwise it's impossible to tell which is which, especially when
sending group messages.

// FREEBIE
This commit is contained in:
lilia 2015-09-18 16:33:40 -07:00
parent d8803ee31f
commit f70e844cef
2 changed files with 6 additions and 6 deletions

View file

@ -65,15 +65,15 @@ TextSecureServer = function () {
try { result = JSON.parse(xhr.responseText + ''); } catch(e) {}
}
if ( 0 <= xhr.status && xhr.status < 400) {
console.log('Success', xhr.status);
console.log('Success', xhr.status, url);
resolve(result, xhr.status);
} else {
console.log('Error', xhr.status);
console.log('Error', xhr.status, url);
reject(HTTPError(xhr.status, result, error.stack));
}
};
xhr.onerror = function() {
console.log('Error', xhr.status);
console.log('Error', xhr.status, url);
reject(HTTPError(xhr.status, null, error.stack));
};
xhr.send( options.data || null );