Page MenuHomePhabricator

Consistent error responses
Closed, InvalidPublic

Description

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.

Event Timeline

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?

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

Post error workshop - make this ticket into the reformat/rewrite tab once it's been discussed

made sub tickets for everything which will be linked to the main error epic