implement errorhandling before sending the request #42