Skip to content

Commit

Permalink
Merge pull request #54 from bcgov/dev
Browse files Browse the repository at this point in the history
Remove klamm sync error causing crash
  • Loading branch information
timwekkenbc authored Nov 12, 2024
2 parents 59ed523 + e9e05b0 commit f77c88a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
10 changes: 0 additions & 10 deletions src/api/klamm/klamm.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
1 change: 0 additions & 1 deletion src/api/klamm/klamm.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
}
}

Expand Down

0 comments on commit f77c88a

Please sign in to comment.