Adds support for async retryOn function
This version adds support for async retryOn
functions, which enhances the capabilities of the custom retry functionality.
Many thanks to the community for providing the feature request, and especially @x3cion and @deefactorial for providing the PRs.