Add error handling to requests.get