-
Notifications
You must be signed in to change notification settings - Fork 682
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
sdk/js: catch-all catch blocks swallow exceptions #3190
Comments
Happy to help with this 👀 @kcsongor could you assign me the issue? 🏄♂️ |
@AlberErre are you still working on this or can I take it up? |
@kcsongor could you please assign the issue to me, I will get started on it |
@kcsongor If no-one is actively working on this. I can pick this up from here. Cheers |
hey @Abhishekkochar, thanks! I don't believe anyone's actively working on this, so I'll assign the issue to you if you're interested in giving it a go |
@kcsongor double checking, are non-org people allowed to contribute? Currently getting error 403 when pushing the branch. I have already check the credentials. Thanks heaps. |
You might have to fork the repo and push the branch to your own fork, then open a PR from there! |
Description and context
In several places, such as integration tests
wormhole/sdk/js/src/token_bridge/__tests__/aptos-integration.ts
Lines 108 to 112 in b09a644
but even in core sdk functions
wormhole/sdk/js/src/nft_bridge/getIsTransferCompleted.ts
Lines 55 to 58 in b09a644
the catch blocks just swallow the exceptions. This is in most cases anticipating a specific exception, so the catch block should just check for that, and rethrow in any other case.
A good example of a catch block that does the correct thing is
wormhole/sdk/js/src/token_bridge/getIsTransferCompleted.ts
Lines 72 to 79 in b09a644
Definition of done
No catch-all catch blocks in the sdk.
The text was updated successfully, but these errors were encountered: