Skip to content

Commit

Permalink
Update apps/server/src/modules/deletion/client/deletion.client.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Sergej Hoffmann <[email protected]>
  • Loading branch information
bn-pass and SevenWaysDP authored Nov 22, 2023
1 parent 61560e9 commit d1142da
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions apps/server/src/modules/deletion/client/deletion.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit d1142da

Please sign in to comment.