@sohanemon/utils 5.1.1 → 5.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -59,6 +59,9 @@ export async function poll(cond, { interval = 5000, timeout = 5 * 60 * 1000, jit
59
59
  await sleep(delay, signal);
60
60
  }
61
61
  }
62
+ catch (err) {
63
+ throw err; // stop polling on any error
64
+ }
62
65
  finally {
63
66
  // cleanup to avoid leaks
64
67
  signal?.removeEventListener('abort', abortListener);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sohanemon/utils",
3
- "version": "5.1.1",
3
+ "version": "5.1.2",
4
4
  "author": "Sohan Emon <sohanemon@outlook.com>",
5
5
  "description": "",
6
6
  "type": "module",