fix - catch key errors when api call fails