mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-07 15:08:24 +00:00
log server errors in edit history dialog
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user