Last modified: 2013-12-03 11:47:55 UTC
https://www.wikidata.org/wiki/Wikidata:Contact_the_development_team#.E2.80.8EChanged_reference_of_claim although this call has also worked https://www.wikidata.org/w/index.php?title=Q2511165&diff=prev&oldid=77750477 wbsetreference should check if a reference exists with the given hash, if it doesn't find said reference it should ERROR to the user saying no such hash (you cant set a reference to a value if it doesn't exist) New references should only be created when no reference hash is passed to the api.
Unable to reproduce - neither with additional PHP Unit tests for ChangeOpReference nor by manually trying to set a reference with an invalid hash. Maybe the API call provided at https://www.wikidata.org/wiki/Wikidata:Contact_the_development_team/Archive/2013/10#.E2.80.8EChanged_reference_of_claim is not the one that caused the error (Quote: "I called wbsetreference with something like [...]"). Both, SetReference and ChangeOpReference check if there already is a reference with the provided hash (see SetReference::validateReferenceHash and ChangeOpReference::setReference).