How to handle network connection drop for repository