ValidationError

Extends

ValidationError.API_CODE
static

default api_code response value

Type:
String
Default: 'validationFailure'
code
readonly
Default: 400
ValidationError.DATA_PATH
static

default error message prefix used for errors with empty invalid property path (eg.: when root data object is invalid)

Type:
String
Default: '$DATA$'
message
Type:
String
new ValidationError(context)
Parameters:
  • context
    • Type: Object
      • keyword
        • Type: String
      • dataPath
        • Type: String
      • schemaPath
        • Type: String
      • params
        • Type: Object
      • parentSchema
        • Type: Object
      • data
        • Type: mixed
      • message
        • Type: String
setUID(uid)
Parameters:
  • uid
    • Type: String or Integer
    • request indentifier

toJSON()Object
Returns: Object
toLogger()Object

similar to RequestError#toJSON except that it returns all information available instead of just public user facing error description.

Returns: Object
toSwagger()Object

Open API schema representation of the error response

Returns: Object
comments powered by Disqus