1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

Log errors for capabilities requests

This commit is contained in:
Travis Ralston
2019-04-09 09:27:38 -06:00
parent 663c096400
commit 6979177fb2

View File

@@ -457,7 +457,10 @@ MatrixClient.prototype.getCapabilities = function() {
// We swallow errors because we need a default object anyhow
return this._http.authedRequest(
undefined, "GET", "/capabilities",
).catch(() => null).then((r) => {
).catch((e) => {
console.error(e);
return null; // otherwise consume the error
}).then((r) => {
if (!r) r = {};
const capabilities = r["capabilities"] || {};