Overview
The library functions return a result that avoids exceptions and facilitates flow control.runreturns an object withok: trueanddata, orok: falseanderror.runAllreturns an array with results per task:ok,errororskipped.- Optional metrics help observe attempts, retries, and duration.
RunResult in run
- Success:
{ ok: true, data, error: null, metrics? } - Error:
{ ok: false, data: null, error, metrics? }
totalAttemptstotalRetriestotalDurationlastError?
RunAllItemResult in runAll
ok: successful task withdataerror: failed task witherrorskipped: task not executed due to cancellation or fail-fast