Automatically retry requests on HTTP 500 response