It tries to call the given synchronous func with the given options. Unlike retryAsync, this handles functions that throw synchronous errors (e.g., JSON.parse('invalid')).
This function is fully synchronous and does not support delays between retries. If you need delay/backoff support, use retryAsync instead. The returned value is analogous to the error handling mechanism in Golang.
Description
It tries to call the given synchronous
funcwith the given options. Unlike retryAsync, this handles functions that throw synchronous errors (e.g.,JSON.parse('invalid')).This function is fully synchronous and does not support delays between retries. If you need delay/backoff support, use retryAsync instead. The returned value is analogous to the error handling mechanism in Golang.
Example