Class: ValidationError

ValidationError(options)

new ValidationError(options)

Create a new ValidationError object

Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Default Description
message String <optional>
Validation Error

Custom error message

$metadata String <optional>
{httpStatusCode: 400}

Custom $metadata

$fault String

Custom $fault

Example
throw new ValidationError({
   message: "id is required",
 });