Added more error handling to hn api