DEV Community

Discussion on: Handling Asynchronous Errors Like a Pro

Collapse
 
sim-la profile image
SL

Nice post thank you 👏
In browsers or JS runtimes that implement the Web API one could use addEventListener("unhandledrejection", eventHandler).
Also I often need to implement retry strategies for my async functions (in case of network error or else). I came up with a tiny utility called Tentative that simplifies the process: github.com/sim-la/tentative, but I'll be curious to hear what others use for handling retries in async functions.