Add error trapping to requests.