I tried to link between the English Wikipedia article Latvian orthography (Q67693351) to the Russian Wikipedia article Латышский алфавит (Q1193493). I used the "Add link" dialog on the client to do this.
I got this error:
Saying "Error: $1" is definitely not supposed to happen. When I tried to merge the item on wikidata.org, I got this:
So, the actual error is probably "The two items cannot be merged because one of them links to the other using the properties". This is probably the text that should be shown on the client dialog instead of "$1".