-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: keySplitInfo Promise.any Promise.all #379
Conversation
If these changes look good, signoff on them with:
If they aren't any good, please remove them with:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can simplify this a little by using Promises.any, but this code should work as is.
If these changes look good, signoff on them with:
If they aren't any good, please remove them with:
|
4831910
to
f94c9e0
Compare
Updated the import path for EntityObject to ensure correct module resolution. Added a comprehensive set of tests for the unwrapKey function to validate error handling and successful key unwrapping scenarios.
Parallelize the KAS key rewrap attempts within unwrapKey for improved efficiency. All potential KAS sources are now processed concurrently, and the method uses the first successful result, enhancing performance and robustness. Errors are collected and the most relevant one is thrown if all attempts fail.
Removed the entire unwrapKey.spec.ts test suite as it is no longer necessary. Minor formatting adjustments were made in the tdf.ts file.
Introduced comprehensive error handling tests for various HTTP status codes in encryption-decryption processes, including 400, 401, 403, and 500 HTTP errors. Adjusted the mock server to validate error conditions based on custom headers and handle network failures.
Simplify the KAS handling logic by using `Promise.any` to stop at the first successful response rather than waiting for all promises to complete. This ensures more efficient error handling and improves overall performance by immediately processing the first successful KAS response, while adequately handling AggregateErrors for failed attempts.
Updated the TypeScript configuration in both "lib" and "cli" projects to use ES2021 language features and modules. This change improves consistency and supports newer JavaScript features.
b704400
to
5c4707b
Compare
Quality Gate failedFailed conditions |
Parallelize the KAS key rewrap attempts within unwrapKey for improved efficiency.
OR Promise.any
All potential KAS sources are now processed concurrently, and the method uses the first successful result, enhancing performance and robustness.
AND Promise.all
Errors are collected and the most relevant one is thrown if all attempts fail.
"target": "es2021",
DSP-287