To avoid that kind of issue, remember to clear cache and cookies regularly and always make sure you have the latest game version. That sounds simple but that usually solves all problems!
Here are the steps to follow in case of connection issue with the store for iOS and for Android.
If you still have issues after doing this, please tell me a bit more: What's your device, when do you get the error (where do you click) and a screenshot would be very helpful.