Main components:
- Action API
User story:
As an API editor
I want to get better feedback on malformed string input
in order to fix my calls.
Problem:
If one is using a malformed string value in an API edit, the users get a "Malformed input" error message. Currently, this error message does not help to find the problem in the string. More assistance would be helpful e.g. for cases of invisible or otherwise indistinguishable characters.
Screenshots:
Solution:
Improve the error message you get from the API for bad strings. Currently, it’s a generic “malformed value” message, but it should be possible to provide a custom message without too much trouble (ValidatorBuilders::getCommonStringValidators() uses a RegexValidator to check whitespace, which already supports a custom $errorCode as an optional constructor argument). We could also point users to wbparsevalue.
Notes:
Acceptance criteria:
- Malformed input error message should be more helpful/actionable for the users.
Open questions: - What exactly should the new message be?
Original:
T47925#7796836 and following