A flexible and configurable retry mechanism for JavaScript functions and fetch requests with exponential delay