fixed retry count when exception is raised for http request