add error handling in newyorks times Json request