log server errors in edit history dialog
This commit is contained in:
parent
e7e6af2592
commit
4dc8de0e71
1 changed files with 4 additions and 0 deletions
|
@ -54,6 +54,10 @@ export default class MessageEditHistoryDialog extends React.PureComponent {
|
||||||
result = await MatrixClientPeg.get().relations(
|
result = await MatrixClientPeg.get().relations(
|
||||||
roomId, eventId, "m.replace", "m.room.message", opts);
|
roomId, eventId, "m.replace", "m.room.message", opts);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
// log if the server returned an error
|
||||||
|
if (error.errcode) {
|
||||||
|
console.error("fetching /relations failed with error", error);
|
||||||
|
}
|
||||||
this.setState({error}, () => reject(error));
|
this.setState({error}, () => reject(error));
|
||||||
return promise;
|
return promise;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue