Avoiding trying to read jsondata when fetching of data has failed