From 461e3f46dce30d3a122b77add900813010951e64 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Fri, 18 Dec 2015 16:56:37 +0000 Subject: [PATCH] Show an ErrorDialog when failing to forget a room --- src/components/structures/RoomView.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 66a60ba8e1..04aa81d3e1 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -871,7 +871,12 @@ module.exports = React.createClass({ MatrixClientPeg.get().forget(this.props.roomId).done(function() { dis.dispatch({ action: 'view_next_room' }); }, function(err) { - console.error("Failed to forget room: %s", err); + var errCode = err.errcode || "unknown error code"; + var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); + Modal.createDialog(ErrorDialog, { + title: "Error", + description: `Failed to forget room (${errCode})` + }); }); },