Configurable retry handling with with_success