What is the problem?
If I attempt to save client hints for a revision of a page that has been deleted, it will return:
{'errorKey': 'rest-nonexistent-revision', 'messageTranslations': {'en': 'The specified revision (10377) does not exist'}, 'httpCode': 404, 'httpReason': 'Not Found'}
Steps to reproduce problem
- Install the CheckUser (client hints will be enabled by default)
- While logged out, edit a page with Firefox
- Record the revision ID of the edit you just made
- Login as an admin user and delete the page
- Run this command, replacing <rev id> with the revision ID you found in step 3
curl 'http://localhost:8080/w/rest.php/checkuser/v0/useragent-clienthints/revision/<rev id>' -H 'Content-Type: application/json' --data-raw '{"architecture":"","bitness":"64","brands":[{"version":"24","brand":"Not)A;Brand"},{"brand":"Chromium","version":"116"}],"fullVersionList":[{"version":"24.0.0.0","brand":"Not)A;Brand"},{"brand":"Chromium","version":"116.0.5845.96"}],"mobile":false,"model":"","platform":"Linux","platformVersion":"5.10.0"}'
Expected behavior: It is successful (the message is something like: We collect user-agent client hint data to support...
Observed behavior: The exception above.
Environment
Wiki(s): CheckUser 2.5 (999417f) 13:47, 28 August 2023.