Added exceptions to API calls.

Some time at night the activities API call doesn’t give me the data I
want and the rest of the script failed.