MatrixChat: Catch errors when fetching room messages in the crawler.
parent
1b63886a6b
commit
89f14e55a2
|
@ -2123,8 +2123,17 @@ export default createReactClass({
|
||||||
const eventMapper = client.getEventMapper();
|
const eventMapper = client.getEventMapper();
|
||||||
// TODO we need to ensure to use member lazy loading with this
|
// TODO we need to ensure to use member lazy loading with this
|
||||||
// request so we get the correct profiles.
|
// request so we get the correct profiles.
|
||||||
const res = await client._createMessagesRequest(checkpoint.roomId,
|
let res;
|
||||||
checkpoint.token, 100, checkpoint.direction);
|
|
||||||
|
try {
|
||||||
|
res = await client._createMessagesRequest(
|
||||||
|
checkpoint.roomId, checkpoint.token, 100,
|
||||||
|
checkpoint.direction);
|
||||||
|
} catch (e) {
|
||||||
|
console.log("Seshat: Error crawling events:", e)
|
||||||
|
this.crawlerChekpoints.push(checkpoint);
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
if (res.chunk.length === 0) {
|
if (res.chunk.length === 0) {
|
||||||
console.log("Seshat: Done with the checkpoint", checkpoint)
|
console.log("Seshat: Done with the checkpoint", checkpoint)
|
||||||
|
|
Loading…
Reference in New Issue