Class

ValidationError

ValidationError(propertyErrors, baseErroropt)

Error which is thrown when there are validation errors with records

Constructor

# new ValidationError(propertyErrors, baseErroropt)

Parameters:
Name Type Attributes Description
propertyErrors PropertyErrors

error messages

baseError RecordError <optional>

base error message

View Source adminjs/src/backend/utils/errors/validation-error.ts, line 11

Classes

ValidationError

Members

RecordError | null

# baseError

One root validation error i.e. thrown when user wants to perform an action which violates foreign key constraint

View Source adminjs/src/backend/utils/errors/validation-error.ts, line 49

PropertyErrors

# propertyErrors

Validation errors for all properties

View Source adminjs/src/backend/utils/errors/validation-error.ts, line 42

number

# statusCode

HTTP Status code: 400

View Source adminjs/src/backend/utils/errors/validation-error.ts, line 55

Type Definitions

object

# PropertyErrors

Property Errors

Properties:
Name Type Description
{...} RecordError

View Source adminjs/src/backend/utils/errors/validation-error.ts, line 29

object

# RecordError

Record Error

Properties:
Name Type Attributes Description
type string <optional>

error type (i.e. required)

message string

human readable message

View Source adminjs/src/backend/utils/errors/validation-error.ts, line 21