From d1142daa25d23d1fb7d360d6869a349550a2959f Mon Sep 17 00:00:00 2001 From: Bartosz Nowicki <116367402+bn-pass@users.noreply.github.com> Date: Wed, 22 Nov 2023 17:16:12 +0100 Subject: [PATCH] Update apps/server/src/modules/deletion/client/deletion.client.ts Co-authored-by: Sergej Hoffmann <97111299+SevenWaysDP@users.noreply.github.com> --- apps/server/src/modules/deletion/client/deletion.client.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/server/src/modules/deletion/client/deletion.client.ts b/apps/server/src/modules/deletion/client/deletion.client.ts index ab57eb50275..a3c47844656 100644 --- a/apps/server/src/modules/deletion/client/deletion.client.ts +++ b/apps/server/src/modules/deletion/client/deletion.client.ts @@ -77,11 +77,9 @@ export class DeletionClient { if (resp.status !== 204) { // Throw an error if any other status code (other than expected "204 No Content" is returned). - const err = new Error(`invalid HTTP status code in a response from the server - ${resp.status} instead of 204`); - - throw new BadGatewayException('DeletionClient:executeDeletions', ErrorUtils.createHttpExceptionOptions(err)); + throw new Error(`invalid HTTP status code in a response from the server - ${resp.status} instead of 204`); } - } catch (err: unknown) { + } catch (err) { // Throw an error if sending deletion request(s) execution trigger has failed. throw new BadGatewayException('DeletionClient:executeDeletions', ErrorUtils.createHttpExceptionOptions(err)); }