Page MenuHomePhabricator

Add error for incorrect sitelink type
Open, Needs TriagePublic

Description

When a user adds a sitelink in the wrong "format" such as

sitelinks: { "afwiki": "a string" }

instead of responding with a generic 500 error we should have a specific error.

Acceptance criteria:

  • For PUT the error code will be 400 and for PATCH it will be 422
  • Error message will read:
{
  "code": "invalid-sitelink-type",
  "message": "Not a valid sitelink type"
}

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone