fix(core): Improve handling of wrapped errors (no-changelog) (#8631)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-02-14 17:29:23 +01:00
committed by GitHub
parent 100d9bc087
commit 2b9391a975
3 changed files with 6 additions and 7 deletions

View File

@@ -13,10 +13,10 @@ describe('NodeError', () => {
const wrapped2 = new NodeOperationError(node, opsError);
expect(wrapped1.level).toEqual('error');
expect(wrapped1.message).toEqual(
'[RE-WRAPPED]: The service was not able to process your request',
);
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('[RE-WRAPPED]: Some operation failed');
expect(wrapped2.message).toEqual('Some operation failed');
expect(wrapped2.tags).toEqual(expect.objectContaining({ reWrapped: true }));
});
});