What is the problem?
If my IP is globally blocked and I attempt to edit via the API anonymously, the error message I see is:
Without IP Masking:
{ "error": { "code": "globalblocking-blockedtext-range", "info": "'''Your IP address is in a range which has been blocked on all wikis.''' The block was made by [[User:Admin|Admin]]. The reason given is Foobar. * Start of block: 08:11, 21 August 2023 * Expiration of block: infinite You can contact [[User:Admin|Admin]] to discuss the block. You cannot use the \"Email this user\" feature unless a valid email address is specified in your [[Special:Preferences|account preferences]] and you have not been blocked from using it. Your current IP address is 3.1.1.1. The blocked range is 3.1.1.1/32. Please include all above details in any queries you make.", "docref": "See http://localhost:8080/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes." }, ...
With IP Masking:
{ "error": { "code": "blocked", "info": "'''Your IP address is in a range which has been blocked on all wikis.''' The block was made by [[User:Admin|Admin]]. The reason given is Foobar. * Start of block: 08:11, 21 August 2023 * Expiration of block: infinite You can contact [[User:Admin|Admin]] to discuss the block. You cannot use the \"Email this user\" feature unless a valid email address is specified in your [[Special:Preferences|account preferences]] and you have not been blocked from using it. Your current IP address is 3.1.1.1. The blocked range is 3.1.1.1/32. Please include all above details in any queries you make.", "blockinfo": { "blockid": 69, "blockedby": "Admin", "blockedbyid": 1, "blockreason": "Foobar", "blockedtimestamp": "2023-08-21T08:11:46Z", "blockexpiry": "infinite", "blockpartial": false, "blocknocreate": true, "blockanononly": true, "blockemail": false, "blockowntalk": true, "blockedtimestampformatted": "08:11, 21 August 2023" }, ...
I don't know why there would be a difference.
Steps to reproduce problem
- Go to https://en.wikipedia.beta.wmflabs.org/wiki/Special:GlobalBlock and block your IP address
- Logout (or open a new browser), go to https://en.wikipedia.beta.wmflabs.org/wiki/Special:ApiSandbox#action=edit&format=json&title=Conflict-title-0.9702253020499916-I%C3%B1t%C3%ABrn%C3%A2ti%C3%B4n%C3%A0liz%C3%A6ti%C3%B8n&appendtext=foobar and submit
- Go to https://de.wikipedia.beta.wmflabs.org/wiki/Spezial:ApiSandbox#action=edit&format=json&title=Web_NDL_Authorities&appendtext=foobar and submit
Expected behavior: Error message in the Results tab should be the same (more or less)
Observed behavior: See the two messages above
Environment
Wiki(s):