This repository was archived by the owner on Dec 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Error handling improvements. #216
Merged
Merged
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
8cf5ef7
Set up client.ethereum before setting up client.publisher, publisher …
timoxley 7f9a204
Use : as id component separator. Avoid conflicts with tools that supp…
timoxley 35bc409
Pass value through GroupKey.from before adding/returning from store.
timoxley a396a93
Fix Session tests. Add client.canEncrypt(). Check can encrypt before …
timoxley 41d8eb7
Tweak error checking in validation test.
timoxley b3103e7
Add default onFinally handler that throws on error.
timoxley 639d7e9
Convert stream/PushQueue.js -> stream/PushQueue.ts.
timoxley 81b6fba
Add own cancellation to PushQueue.
timoxley 14e0a57
Convert stream/Encryption.js -> stream/Encryption.ts.
timoxley a98cf41
WIP fix error propagation & caching.
timoxley 424e4bb
Add tests around iteratorFinally & throw.
timoxley 71de1e4
Test errors in pipeline.
timoxley 8dff646
Share generic iterator tests with PushQueue.
timoxley eb52fc1
Use WeakMap for generator end caching.
timoxley 20bef0d
Clean up async in iterator/PushQueue tests.
timoxley a8a8783
Add more iterator tests around error handling.
timoxley aa327ca
WIP encryption/subscription error handling.
timoxley 4272c90
Cleaned up, but still WIP encryption/subscription error handling.
timoxley 782acda
Further cleaning on WIP encryption/subscription error handling.
timoxley 8131cd7
Tracking down unhandled error. Decrypt in series.
timoxley ebbac17
Test multiple failures in Subscription pipeline.
timoxley 93bc9be
Allow mocking sub/unsub calls in Subscription.
timoxley 644cc0f
Add MessagePipeline.test.js.
timoxley 630cf66
Get better stack traces & errors out of Scaffold.
timoxley 4b50aef
Convert CancelableGenerator to return object with cancel function.
timoxley 96ab8ac
Don't ignore PushQueue throw until finished.
timoxley ed4a732
Tweak iterators.
timoxley 76e3d9c
Fix unhandled rejection in keyexchange. Improve subscription error ha…
timoxley 7b8c6cb
Fix AggregatedError stack not including self.
timoxley 48f9abe
Fix missing optional id in Config.
timoxley 9245a52
Fix blocked pipeline on error.
timoxley 468ab5d
Fix incorrect canEncrypt() result.
timoxley 9ae1578
Linting.
timoxley 0a98488
Prevent suppressing of rethrown error from subscription pipeline onEr…
timoxley 1841741
fix(subscribe): Clean up type errors.
timoxley 47e2c81
style(config): Clean up whitespace.
timoxley 41fe830
test: Fix SubscriberResends uncontrolled setTimeout.
timoxley 6ee58f9
test(subscribe, iterators): Fix error handling.
timoxley ce637a5
test(iterators): Fix error handling.
timoxley 20825eb
fix(encryption): Give GroupKey same interface as protocol's Encrypted…
timoxley 9f0dbb1
types(test): Fix setTimeout typing in SubscriberResends tests.
timoxley 21cf74a
build(client-testing): Retry client-testing once, reduce timeout from…
timoxley e11ebd5
style: Add comments, tidy types.
timoxley cb576fd
fix(keyexchange): Remove bad call to cancelTask.
timoxley 9bd0bae
refactor(encryption): Remove static validateGroupKey from Encryption …
timoxley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
If the use provides the id, it is maybe unique enough to distinguish the instances? This
counterId(${this.constructor.name}:${uid})could be just a fallback if no explicit id is provided.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.
Good point, though the wrapper around the
idhere was added to ensure I get unique results across tests, but I can give the tests known "ids":e.g.
Doesn't matter so much as this is 100% for debugging/logging purposes currently, but maybe
idisn't the rightoptionproperty, perhaps it should benameor something.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.
Yes, name would describe it better 👍
There is the same situation in
Subscriptionclass (line 53)