···2222 //TODO need to pass on the full url later for logging to the db and notifiation
2323 let atUriSplit = label.uri.split("/");
2424 let repoDid = atUriSplit[2];
2525+ if (repoDid === undefined) {
2626+ throw new Error(`Invalid URI: ${label.uri}`);
2727+ }
2828+ targetDid = repoDid;
2529 }
26302731 // TODO: MAKE SURE TO CHECK NEG