Added some error handling to the service requests.