Retry getting the api-dict if network problems

While upgrading my bridge, I noticed that the program crashed since
the bridge went offline for a short time. Since this program is meant
to be running continuously, it should be robust to minor failures.