From 9963945c2707f0ca08dada1d34bc4c0b116dbc3c Mon Sep 17 00:00:00 2001 From: bramjanssen Date: Fri, 26 Jan 2024 12:45:50 +0100 Subject: [PATCH] refactor(#33): removed unused code --- .../services/database/database.service.ts | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/src/jobs/services/database/database.service.ts b/src/jobs/services/database/database.service.ts index cb60c8b..6de7650 100644 --- a/src/jobs/services/database/database.service.ts +++ b/src/jobs/services/database/database.service.ts @@ -203,29 +203,4 @@ export class DatabaseService { }, }, }); - - /** - * Check if the bulk response of the ES contains an error for one of the items - * @param body - ES response body - * @private - */ - private hasBulkErrors(body: Record) { - return this.getBulkErrors(body).length > 0; - } - - /** - * Extract the errors from the ES response body - * @param body - ES response body - * @private - */ - private getBulkErrors( - body: Record, - ): { idx: number; error: any }[] { - return (body.items || []) - .map((i, idx) => ({ - idx, - error: i.index?.error?.reason, - })) - .filter((i) => !!i.error); - } }