Page MenuHomePhabricator

JSONSchemaField validator does not produce expected api error responses
Closed, ResolvedPublicBUG REPORT

Description

Steps to Reproduce:

Make an API edit that violates a JSONSchemaField constraint

Actual Results:

AssertionError at /api/tools/
ValidationError raised by `JSONSchemaField`, but error key `invalid` does not exist in the `error_messages` dictionary.

Expected Results:

API error response confirming to the schema:

{
code*: number
message*: string
status_code: number
errors* : [{
code: number
field*: string
message*: string
}]
}

Event Timeline

Change 664045 had a related patch set uploaded (by BryanDavis; owner: Bryan Davis):
[wikimedia/toolhub@main] JSONSchemaValidator: update message and add friendly code

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

Change 664045 merged by jenkins-bot:
[wikimedia/toolhub@main] JSONSchemaValidator: update message and add friendly code

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

bd808 moved this task from In Progress to Review on the Toolhub board.