show better errors when slash commands fail

pull/21833/head
Matthew Hodgson 2017-04-23 01:32:51 +01:00
parent 6a63c7e50c
commit db996f678c
2 changed files with 2 additions and 2 deletions

View File

@ -510,7 +510,7 @@ export default class MessageComposerInput extends React.Component {
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createDialog(ErrorDialog, {
title: "Server error",
description: "Server unavailable, overloaded, or something else went wrong.",
description: ((err && err.message) ? err.message : "Server unavailable, overloaded, or something else went wrong."),
});
});
}

View File

@ -312,7 +312,7 @@ export default React.createClass({
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createDialog(ErrorDialog, {
title: "Server error",
description: "Server unavailable, overloaded, or something else went wrong.",
description: ((err && err.message) ? err.message : "Server unavailable, overloaded, or something else went wrong."),
});
});
}