This error generally occurs when you are trying to create relationship records, specifically if there is an issue creating the original constituent. For example if Mr X is a primary constituent and My Y is the relationship, if Mr X fails to create due to an exception, then Mr Y will not have a constituent to link to, so it gives the erroneous error that it cannot link to a constituent with id of 0. We are aware of this error and are working on a fix which will give a more obvious and actionable error message.