Improve error logging/reporting in megolm import/export
I saw a rageshake where somebody had apparently failed to import a key file. I have no idea why it happened. Also try to make the errors the users see useful.
This commit is contained in:
parent
b16e652acc
commit
175599beda
4 changed files with 129 additions and 56 deletions
|
@ -89,11 +89,13 @@ export default React.createClass({
|
|||
// TODO: it would probably be nice to give some feedback about what we've imported here.
|
||||
this.props.onFinished(true);
|
||||
}).catch((e) => {
|
||||
console.error("Error importing e2e keys:", e);
|
||||
if (this._unmounted) {
|
||||
return;
|
||||
}
|
||||
const msg = e.friendlyText || _t('Unknown error');
|
||||
this.setState({
|
||||
errStr: e.message,
|
||||
errStr: msg,
|
||||
phase: PHASE_EDIT,
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue