error handling failing to get json