Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(runner-sdk): catch void this.log (#3474)
not awaiting this.log could lead to an unhandledException and a runner crash when the script is aborted. This commit ensures exception are caught when calling this.log without awaiting #How to test: 1. Create a sync where you call a nango function in a loop. Be careful a lot of methods memoized and don't call the API more than once. Ex: ``` ... const waitSecs = 30; const now = new Date(); await nango.log(`waiting for ${waitSecs} seconds`); while (new Date().getTime() - now.getTime() < waitSecs * 1000) { await nango.getEnvironmentVariables(); } ... ``` 2. Cancel the sync while in the loop 3. Notice the crash of the runner when not on this branch. 4. Checkout this branch and confirm that cancelling doesn't crash the runner and successfully abort the script
- Loading branch information