MCPcopy
hub / github.com/vercel/async-retry / runAttempt

Function runAttempt

lib/index.js:38–53  ·  view source on GitHub ↗
(num)

Source from the content-addressed store, hash-verified

36 }
37
38 function runAttempt(num) {
39 var val;
40
41 try {
42 val = fn(bail, num);
43 } catch (err) {
44 onError(err, num);
45 return;
46 }
47
48 Promise.resolve(val)
49 .then(resolve)
50 .catch(function catchIt(err) {
51 onError(err, num);
52 });
53 }
54
55 op.attempt(runAttempt);
56 }

Callers

nothing calls this directly

Calls 1

onErrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…