Page MenuHomePhabricator

📛 Replace `sitelink-conflict` error with `data-policy-violation`
Closed, ResolvedPublic

Description

The new error should follow this format:

HTTP status code: 422
"code":"data-policy-violation"
"message":"Edit violates data policy"
"context":{ "violation": "{violation}", "violation_context": { "some": "context" } }

Note:

  • remember to check if the OAS needs updating as well.
  • {violation} is one of the existing error codes (see main ticket, minus patch-result- errors)
  • {violation_context} includes the illegal context, e.g. { "language-code": "foo" }

Event Timeline

Change #1058640 had a related patch set uploaded (by Muhammad Jaziraly; author: Muhammad Jaziraly):

[mediawiki/extensions/Wikibase@master] REST: Replace `sitelink-conflict` error with `data-policy-violation`

https://gerrit.wikimedia.org/r/1058640

Change #1058640 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] REST: Replace `sitelink-conflict` error with `data-policy-violation`

https://gerrit.wikimedia.org/r/1058640