From e9e05b03f1030c5b075405515c23e0446c26e556 Mon Sep 17 00:00:00 2001 From: timwekkenbc Date: Tue, 12 Nov 2024 15:09:06 -0800 Subject: [PATCH] Remove klamm sync error causing crash --- src/api/klamm/klamm.service.spec.ts | 10 ---------- src/api/klamm/klamm.service.ts | 1 - 2 files changed, 11 deletions(-) diff --git a/src/api/klamm/klamm.service.spec.ts b/src/api/klamm/klamm.service.spec.ts index 140b8e7..50fb132 100644 --- a/src/api/klamm/klamm.service.spec.ts +++ b/src/api/klamm/klamm.service.spec.ts @@ -273,16 +273,6 @@ describe('KlammService', () => { ); }); - it('should handle error in _updateRuleInKlamm', async () => { - const mockRulePayload = { name: 'rule1' } as KlammRulePayload; - const mockRuleId = 1; - jest.spyOn(service.axiosKlammInstance, 'put').mockRejectedValue(new Error('Error')); - - await expect(service['_updateRuleInKlamm'](mockRuleId, mockRulePayload)).rejects.toThrow( - 'Error updating rule 1 in Klamm', - ); - }); - it('should update last sync timestamp correctly', async () => { jest.spyOn(klammSyncMetadata, 'findOneAndUpdate').mockResolvedValue(undefined); diff --git a/src/api/klamm/klamm.service.ts b/src/api/klamm/klamm.service.ts index 491da78..c418aca 100644 --- a/src/api/klamm/klamm.service.ts +++ b/src/api/klamm/klamm.service.ts @@ -259,7 +259,6 @@ export class KlammService { await this.axiosKlammInstance.put(`${process.env.KLAMM_API_URL}/api/brerules/${currentKlamRuleId}`, rulePayload); } catch (error) { this.logger.error(`Error updating rule ${currentKlamRuleId} in Klamm:`, error.message); - throw new Error(`Error updating rule ${currentKlamRuleId} in Klamm`); } }