At the time of writing the REST API's error responses are not consistent. Some errors use the { "code": "[SOME CODE]", "message": "[SOME MESSAGE]" } responses format defined by us, while others respond in a format defined by MediaWiki. This is especially apparent in validation errors, where some basic validation (checking whether fields are present and have the correct type) happens at the framework level and results in errors in the framework's format, while domain-specific validation is handled at the use case level and results in errors in our custom format.
Description
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Ifrahkhanyaree_WMDE | T316718 Errors in Wikibase REST API | |||
Invalid | None | T313721 Consistent error responses | |||
Invalid | None | T349299 Edit invalid 422 errors to be more generic and consistent for labels, descriptions and statements | |||
Resolved | BUG REPORT | Dima_Koushha_WMDE | T349813 Handle illegal type modifications of the root element in PATCH requests |
Event Timeline
Comment Actions
We also mean this within the error response I (as a user) see on the swagger docs (and when I make an error generally) right? I want to go through everything on our Swagger docs and was thrown off by the "..happens at the framework level and results in errors in the framework's format.."
Could someone tell me an example of this?
Comment Actions
Doc here: https://docs.google.com/document/d/1UV4ydf7zwZRO6vgQJB5kpVe0l2WPeIuYVwJ6F1rXvqc/edit?usp=sharing
Update from 11.03 -
- Make general sounding errors for sitelinks and terms more specific so they can be reused in creating items/properties as a whole.
- Before we start work on this ticket, have a source of truth google sheet with all the "correct" wording of the errors
Comment Actions
Post error workshop - make this ticket into the reformat/rewrite tab once it's been discussed