Page MenuHomePhabricator

API error response for too-similar username does not include a meaningful error code
Closed, DuplicatePublicBUG REPORT

Description

List of steps to reproduce

What happens?:

  • The response looks like this:
{"batchcomplete":"","query":{"users":[{"name":"Rages0ss","missing":"","cancreateerror":[{"message":"$1","params":["The username &quot;Rages0ss&quot; is too similar to the following username:<ul><li>Ragesoss</li></ul>Please choose another username."],"code":"_1","type":"error"}]}]}}

Unlike other error responses (for example, when a username is invalid), this cancreaterror does not include a meaningful code attribute. Instead of _1, it should be something like toosimilar.