Last modified: 2014-04-30 08:08:43 UTC
Request: {'format': 'json', 'bot': True, 'token': '********', 'action': 'wbeditentity', 'new': 'item', 'data': '{}'} in urlencoded form. Response: {"servedby": "mw1115", "error": {"info": "Could not create a new page.\nIt already exists.", "code": "save-failed", "messages": {"0": {"type": "error", "name": "edit-already-exists"}, "html": {"*": "<p>Could not create a new page.\nIt already exists.\n</p>"}}}} Per DanielK: "that sounds like a race condition. should not happen, the id increment function should be atomic."
*** Bug 52615 has been marked as a duplicate of this bug. ***
While the underlying problem shouldnt occur, the current error condition should be given a different error name because 'edit-already-exists' in core is a permanent error whereas Wikibase is using it for a transient & internal error condition. If it has its own error code, software can detect this problem and decide whether to resubmit based on whether the Wikibase server version indicates resubmitting will resolve the error.(i.e. when talking to a server with the underlying bug is fixed, the software would not presume this error code is transient.) As an example, pywikibot is currently resubmitting (25 times?) on any 'failed-save' error response, including (almost) permanent error conditions like wikibase-error-label-not-unique-item. I've provided sample code for better handling on bug 62126.