Validation Errors

Validation errors can be raised if, for example, a parameter is missing or has an invalid value. If a validation error occurs, the code field (in the JSON response message) will be 400, and the field validationErrors will be populated with details of what failed validation.

Example response message containing a validation error:

{
    "validationErrors": [
        "Query is null"
    ],
    "date": "2011-02-28T12:01:02.345+1000", 
    "time": 20, 
    "code": 400, 
    "message": "The request contained invalid parameters."
}

When a validation error occurs, no search results will be returned.

Validation Warnings

Validation warnings can be raised if a parameter has an invalid value. If a validation warning occurs, the code field (in the JSON response message) will be 206, and the field validationWarnings will be populated with details of what failed validation.

Example response message containing a validation warning:

{
    "validationWarning": [
        "Invalid value given for 'id':eyJib29rSWQiOiJTMDBXIiwibGlzdGluZ05hbWUiOiJzdWJz"
    ],
    "date": "2011-02-28T12:01:02.345+1000", 
    "time": 20, 
    "code": 206, 
    "message": "The request contained invalid parameters."
}

When a validation error occurs, the request will have only partially succeeded.