Nicer errors if json couldn't be parsed