exceptionHandler
Configures the exception handler to use when retries are exhausted. By default, the exception, if any, is thrown. For example, if maximum attempts are reached and the exception handler is not set, the exception will be thrown. Use this method to handle exceptions that occur during the retry operation in a custom way (e.g., logging specific exceptions).
Parameters
handler
the exception handler to use.