As a Wikidata gadget developer I want to know what part of my input caused an error so that I can adjust my code and make successful edits as intended.
The following table summarizes the intended changes to error reports ("error code" and the English error message) in particular situations. WMDE team can find more details, including example input, in the internal working document: https://docs.google.com/spreadsheets/d/1NWvIlCGl23J62Ug08En2Uu-wVRRwx36p-ECZJ6T2fSE/edit#gid=0
Additionally, `error-context` field is to be added to error responses on PATCH routes. Its value is a JSON object. In PATCH error responses, error context is supposed to be a JSON Patch object that is relevant for an error.
<table>
<tr>
<th>Description</th>
<th>current error (code)</th>
<th>Intended error</th>
</tr>
<tr>
<td>incorrect JSON patch operation</td>
<td>`invalid-patch`</td>
<td> `invalid-json-patch-operation`
`incorrect JSON patch operation: {op}`</td>
</tr>
<tr>
<td>missing mandatory field in JSON patch (`op`, `path`, `value`, also `from` on copy/move patches)</td>
<td>`invalid-patch`</td>
<td>`missing-json-patch-field`
`Missing {field} in JSON patch`</td>
</tr>
</table>