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:
parent
d8803ee31f
commit
f70e844cef
2 changed files with 6 additions and 6 deletions
|
@ -38953,15 +38953,15 @@ TextSecureServer = function () {
|
||||||
try { result = JSON.parse(xhr.responseText + ''); } catch(e) {}
|
try { result = JSON.parse(xhr.responseText + ''); } catch(e) {}
|
||||||
}
|
}
|
||||||
if ( 0 <= xhr.status && xhr.status < 400) {
|
if ( 0 <= xhr.status && xhr.status < 400) {
|
||||||
console.log('Success', xhr.status);
|
console.log('Success', xhr.status, url);
|
||||||
resolve(result, xhr.status);
|
resolve(result, xhr.status);
|
||||||
} else {
|
} else {
|
||||||
console.log('Error', xhr.status);
|
console.log('Error', xhr.status, url);
|
||||||
reject(HTTPError(xhr.status, result, error.stack));
|
reject(HTTPError(xhr.status, result, error.stack));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
xhr.onerror = function() {
|
xhr.onerror = function() {
|
||||||
console.log('Error', xhr.status);
|
console.log('Error', xhr.status, url);
|
||||||
reject(HTTPError(xhr.status, null, error.stack));
|
reject(HTTPError(xhr.status, null, error.stack));
|
||||||
};
|
};
|
||||||
xhr.send( options.data || null );
|
xhr.send( options.data || null );
|
||||||
|
|
|
@ -65,15 +65,15 @@ TextSecureServer = function () {
|
||||||
try { result = JSON.parse(xhr.responseText + ''); } catch(e) {}
|
try { result = JSON.parse(xhr.responseText + ''); } catch(e) {}
|
||||||
}
|
}
|
||||||
if ( 0 <= xhr.status && xhr.status < 400) {
|
if ( 0 <= xhr.status && xhr.status < 400) {
|
||||||
console.log('Success', xhr.status);
|
console.log('Success', xhr.status, url);
|
||||||
resolve(result, xhr.status);
|
resolve(result, xhr.status);
|
||||||
} else {
|
} else {
|
||||||
console.log('Error', xhr.status);
|
console.log('Error', xhr.status, url);
|
||||||
reject(HTTPError(xhr.status, result, error.stack));
|
reject(HTTPError(xhr.status, result, error.stack));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
xhr.onerror = function() {
|
xhr.onerror = function() {
|
||||||
console.log('Error', xhr.status);
|
console.log('Error', xhr.status, url);
|
||||||
reject(HTTPError(xhr.status, null, error.stack));
|
reject(HTTPError(xhr.status, null, error.stack));
|
||||||
};
|
};
|
||||||
xhr.send( options.data || null );
|
xhr.send( options.data || null );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue