ValidationError
Extension of ApiError containing an extra field for validation errors
Constructor Summary
Public Constructor | ||
public |
constructor(params: Object) |
Member Summary
Public Members | ||
public get |
True if the error contains schema errors |
|
public get |
Get validation error messages |
|
public |
Get the schema errors if available |
|
public |
Any validation errors |
Inherited Summary
From class ApiError | ||
public get |
Returns if the error contained a stacktrace that has been parsed This should only be true if the API is in debug mode. |
|
public |
Get the request options |
|
public |
request: Request Get the request |
|
public |
response: Response Get the response |
|
public |
Http error code |
|
public |
Get the parsed stacktrace from the error |
|
public |
Error type |
|
public |
Display-able string |
Public Constructors
Public Members
public schemaErrors: SchemaError[] source
Get the schema errors if available
Example:
[
{
"property": "data.meta",
"pointer": "/data/meta",
"message": "The property meta is required",
"constraint": {
"name": "required",
"params": {
"property": "meta"
}
},
"context": 1
},
{
"property": "data.paper",
"pointer": "/data/paper",
"message": "The property paper is required",
"constraint": {
"name": "required",
"params": {
"property": "paper"
}
},
"context": 1
},
{
"property": "data.scaleDefinition",
"pointer": "/data/scaleDefinition",
"message": "The property scaleDefinition is required",
"constraint": {
"name": "required",
"params": {
"property": "scaleDefinition"
}
},
"context": 1
}
]