Page MenuHomePhabricator

Apply strict validation when constructing DataValue objects
Closed, ResolvedPublic

Description

DataValue objects should perform strict validation on the parameters they receive in their constructor, and throw well defined and informative exceptions when validation fails.

The API needs to catch these exceptions and turn them into an appropriate API error response.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=49433

Details

Reference
bz49264

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:56 AM
bzimport set Reference to bz49264.
bzimport added a subscriber: Unknown Object (MLST).

Related URL: https://gerrit.wikimedia.org/r/67962 (Gerrit Change I6990983ef0c0cad7c9d4f271bdf803902b94230b)

Related URL: https://gerrit.wikimedia.org/r/68150 (Gerrit Change I8916062971114d6bc3188dd4f0322c28cc54403e)

https://gerrit.wikimedia.org/r/68150 (Gerrit Change I8916062971114d6bc3188dd4f0322c28cc54403e) | change APPROVED and MERGED [by jenkins-bot]

https://gerrit.wikimedia.org/r/67962 (Gerrit Change I6990983ef0c0cad7c9d4f271bdf803902b94230b) | change ABANDONED [by Daniel Kinzler]

Related URL: https://gerrit.wikimedia.org/r/68152 (Gerrit Change I72d6b6d890718c07006c306c254479ce0789067e)

Related URL: https://gerrit.wikimedia.org/r/68952 (Gerrit Change I8286b6c1ce31be0d9cb1ccd34ea3a763d4fb223b)

Related URL: https://gerrit.wikimedia.org/r/69659 (Gerrit Change I1e2543c75f0407a22e531aac67ace9cf3f5670ae)

Related URL: https://gerrit.wikimedia.org/r/70433 (Gerrit Change I9920286723e04ba2005b608583c45338f53d21fd)

Related URL: https://gerrit.wikimedia.org/r/70443 (Gerrit Change Id27f19020e2fd75a250fea4deb1eb94aeeff6f3f)

Change 68952 abandoned by Daniel Kinzler:
(bug 49264) Handle corrupt data values gracefully.

Reason:
Use I9920286723 instead. It seems that handling bad values on the DataValue level is less awkward.

https://gerrit.wikimedia.org/r/68952

Change 70433 merged by Jeroen De Dauw:
(bug 49264) Handle bad values using UnDeserializableValue.

https://gerrit.wikimedia.org/r/70433

Change 68152 merged by jenkins-bot:
(bug 49264, bug 48965) validate time format.

https://gerrit.wikimedia.org/r/68152

Change 70443 merged by jenkins-bot:
(bug 49264) Handle UnDeserializableValue gracefully.

https://gerrit.wikimedia.org/r/70443

Change 68002 merged by jenkins-bot:
(bug 49264) Handle UnDeserializableValue gracefully.

https://gerrit.wikimedia.org/r/68002

Change 69659 merged by jenkins-bot:
(bug 49264) Make SnakValidator fail on bad values.

https://gerrit.wikimedia.org/r/69659

Verified in Wikidata demo July 31th.