From 6d535cd0267678710766481a5eb8a096f75c5edd Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Wed, 12 Oct 2022 14:50:38 -0700 Subject: [PATCH] sendToGroup/_shouldFailSend: Don't fail send on 401 --- ts/test-electron/util/sendToGroup_test.ts | 4 ++-- ts/util/sendToGroup.ts | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/ts/test-electron/util/sendToGroup_test.ts b/ts/test-electron/util/sendToGroup_test.ts index de7c56c1196..0fe3cb6dc30 100644 --- a/ts/test-electron/util/sendToGroup_test.ts +++ b/ts/test-electron/util/sendToGroup_test.ts @@ -233,7 +233,7 @@ describe('sendToGroup', () => { it('returns true for a specified error codes', () => { // eslint-disable-next-line @typescript-eslint/no-explicit-any const error: any = new Error('generic'); - error.code = 401; + error.code = 428; assert.isTrue(_shouldFailSend(error, 'testing generic')); assert.isTrue( @@ -321,7 +321,7 @@ describe('sendToGroup', () => { // eslint-disable-next-line @typescript-eslint/no-explicit-any const error: any = new Error('generic'); - error.code = 401; + error.code = 428; assert.isTrue( _shouldFailSend( diff --git a/ts/util/sendToGroup.ts b/ts/util/sendToGroup.ts index 8fa81e5826e..4bc6be8655b 100644 --- a/ts/util/sendToGroup.ts +++ b/ts/util/sendToGroup.ts @@ -787,11 +787,6 @@ export function _shouldFailSend(error: unknown, logId: string): boolean { return true; } - if (error.code === 401) { - logError('Permissions error, failing.'); - return true; - } - if (error.code === 404) { logError('Missing user or endpoint error, failing.'); return true;