Runs an operation until it produces a result, backing off between tries.
run signals failure by resolving null rather than throwing — the socials
helpers log the API's message and resolve null, so a loop that only caught
exceptions would never retry.
Parameters
run: (attempt:number)=>Promise<T|null>
Receives the 1-based attempt number; resolve null to retry.
Runs an operation until it produces a result, backing off between tries.
runsignals failure by resolvingnullrather than throwing — the socials helpers log the API's message and resolvenull, so a loop that only caught exceptions would never retry.