From b4981c6005f58dd132d0aacb9a7e2000106e9e89 Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Fri, 22 Apr 2022 12:17:15 -0700 Subject: [PATCH] Ignore PNI key upload errors for now Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> --- ts/textsecure/AccountManager.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/ts/textsecure/AccountManager.ts b/ts/textsecure/AccountManager.ts index ec9cc90d2..a0b0fd267 100644 --- a/ts/textsecure/AccountManager.ts +++ b/ts/textsecure/AccountManager.ts @@ -310,8 +310,20 @@ export default class AccountManager extends EventTarget { kind ); - await this.server.registerKeys(keys, kind); - await this.confirmKeys(keys, kind); + try { + await this.server.registerKeys(keys, kind); + await this.confirmKeys(keys, kind); + } catch (error) { + if (kind === UUIDKind.PNI) { + log.error( + 'Failed to upload PNI prekeys. Moving on', + Errors.toLogFormat(error) + ); + return; + } + + throw error; + } }) ); } finally {