handle failure while sending requests.