fix: Prevent NodeApiError rewraping (no-changelog) (#9627)

This commit is contained in:
Michael Kret
2024-06-05 14:21:32 +03:00
committed by GitHub
parent 411ffbda7f
commit 37531cdb7d
3 changed files with 11 additions and 7 deletions

View File

@@ -12,11 +12,7 @@ describe('NodeError', () => {
const wrapped1 = new NodeOperationError(node, apiError);
const wrapped2 = new NodeOperationError(node, opsError);
expect(wrapped1.level).toEqual('error');
expect(wrapped1.message).toEqual('The service was not able to process your request');
expect(wrapped1.tags).toEqual(expect.objectContaining({ reWrapped: true }));
expect(wrapped2.level).toEqual('error');
expect(wrapped2.message).toEqual('Some operation failed');
expect(wrapped2.tags).toEqual(expect.objectContaining({ reWrapped: true }));
expect(wrapped1).toEqual(apiError);
expect(wrapped2).toEqual(opsError);
});
});