Wrap get_data into try/except