gracefully handle setAccountData failure

This commit is contained in:
jesopo 2022-04-04 09:38:17 +00:00
parent 7dd98c0b98
commit e518541fd0

View File

@ -81,7 +81,11 @@ export class ReportPoll {
if (response.next_token !== undefined) {
this.from = response.next_token;
await this.mjolnir.client.setAccountData(REPORT_POLL_EVENT_TYPE, { from: response.next_token });
try {
await this.mjolnir.client.setAccountData(REPORT_POLL_EVENT_TYPE, { from: response.next_token });
} catch (ex) {
await this.mjolnir.logMessage(LogLevel.ERROR, "getAbuseReports", `failed to update progress: ${ex}`);
}
}
this.schedulePoll();