display err.message to user if available in error msgs

This commit is contained in:
Matthew Hodgson 2017-04-23 01:48:27 +01:00
parent db996f678c
commit a2be764681
6 changed files with 21 additions and 21 deletions

View file

@ -241,8 +241,8 @@ module.exports = WithMatrixClient(React.createClass({
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
console.error("Kick error: " + err);
Modal.createDialog(ErrorDialog, {
title: "Error",
description: "Failed to kick user",
title: "Failed to kick",
description: ((err && err.message) ? err.message : "Operation failed"),
});
}
).finally(()=>{