In https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/967138 we are handling an error case for PATCH Item/Property aliases (T337371 and T342982), when the user tries to replace the entire aliases list with a new value of invalid type (e.g. string).
The same attempt will fail with a "500 unexpected-error" on all other PATCH endpoints:
- PATCH /entities/items/{item_id}/labels
- PATCH /entities/properties/{property_id}/labels
- PATCH /entities/items/{item_id}/descriptions
- PATCH /entities/properties/{property_id}/descriptions
- PATCH /entities/items/{item_id}/statements/{statement_id}
- PATCH /entities/properties/{property_id}/statements/{statement_id}
- PATCH /statements/{statement_id}
We should handle these error cases and return a patch-result-invalid-value error