Exit if cannot connect to API