Hope that helps. Take care. When I received the Error 1005 I found it was that the iCloud terms and conditions hadn't been agreed to on the phone trying to accept the invite to family sharing. Once I went to that phone and completed the iCloud term and conditions setup the invite completed without issue.