Improve error reporting when EventIndex fails on a supported environment
This commit is contained in:
parent
78b1f6c0b1
commit
5104d7bed8
3 changed files with 21 additions and 1 deletions
|
@ -190,7 +190,7 @@ export default class EventIndexPanel extends React.Component {
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
} else {
|
} else if (!EventIndexPeg.platformHasSupport()) {
|
||||||
eventIndexingSettings = (
|
eventIndexingSettings = (
|
||||||
<div className='mx_SettingsTab_subsectionText'>
|
<div className='mx_SettingsTab_subsectionText'>
|
||||||
{
|
{
|
||||||
|
@ -208,6 +208,23 @@ export default class EventIndexPanel extends React.Component {
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
eventIndexingSettings = (
|
||||||
|
<div className='mx_SettingsTab_subsectionText'>
|
||||||
|
<p>
|
||||||
|
{_t("Message search initilisation failed")}
|
||||||
|
</p>
|
||||||
|
{EventIndexPeg.error && (
|
||||||
|
<details>
|
||||||
|
<summary>{_t("Advanced")}</summary>
|
||||||
|
<code>
|
||||||
|
{EventIndexPeg.error.message}
|
||||||
|
</code>
|
||||||
|
</details>
|
||||||
|
)}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return eventIndexingSettings;
|
return eventIndexingSettings;
|
||||||
|
|
|
@ -1081,6 +1081,7 @@
|
||||||
"Securely cache encrypted messages locally for them to appear in search results.": "Securely cache encrypted messages locally for them to appear in search results.",
|
"Securely cache encrypted messages locally for them to appear in search results.": "Securely cache encrypted messages locally for them to appear in search results.",
|
||||||
"%(brand)s is missing some components required for securely caching encrypted messages locally. If you'd like to experiment with this feature, build a custom %(brand)s Desktop with <nativeLink>search components added</nativeLink>.": "%(brand)s is missing some components required for securely caching encrypted messages locally. If you'd like to experiment with this feature, build a custom %(brand)s Desktop with <nativeLink>search components added</nativeLink>.",
|
"%(brand)s is missing some components required for securely caching encrypted messages locally. If you'd like to experiment with this feature, build a custom %(brand)s Desktop with <nativeLink>search components added</nativeLink>.": "%(brand)s is missing some components required for securely caching encrypted messages locally. If you'd like to experiment with this feature, build a custom %(brand)s Desktop with <nativeLink>search components added</nativeLink>.",
|
||||||
"%(brand)s can't securely cache encrypted messages locally while running in a web browser. Use <desktopLink>%(brand)s Desktop</desktopLink> for encrypted messages to appear in search results.": "%(brand)s can't securely cache encrypted messages locally while running in a web browser. Use <desktopLink>%(brand)s Desktop</desktopLink> for encrypted messages to appear in search results.",
|
"%(brand)s can't securely cache encrypted messages locally while running in a web browser. Use <desktopLink>%(brand)s Desktop</desktopLink> for encrypted messages to appear in search results.": "%(brand)s can't securely cache encrypted messages locally while running in a web browser. Use <desktopLink>%(brand)s Desktop</desktopLink> for encrypted messages to appear in search results.",
|
||||||
|
"Message search initilisation failed": "Message search initilisation failed",
|
||||||
"Connecting to integration manager...": "Connecting to integration manager...",
|
"Connecting to integration manager...": "Connecting to integration manager...",
|
||||||
"Cannot connect to integration manager": "Cannot connect to integration manager",
|
"Cannot connect to integration manager": "Cannot connect to integration manager",
|
||||||
"The integration manager is offline or it cannot reach your homeserver.": "The integration manager is offline or it cannot reach your homeserver.",
|
"The integration manager is offline or it cannot reach your homeserver.": "The integration manager is offline or it cannot reach your homeserver.",
|
||||||
|
|
|
@ -31,6 +31,7 @@ class EventIndexPeg {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.index = null;
|
this.index = null;
|
||||||
this._supportIsInstalled = false;
|
this._supportIsInstalled = false;
|
||||||
|
this.error = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -96,6 +97,7 @@ class EventIndexPeg {
|
||||||
await index.init();
|
await index.init();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log("EventIndex: Error initializing the event index", e);
|
console.log("EventIndex: Error initializing the event index", e);
|
||||||
|
this.error = e;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue