API reference / @backpack/aws-lambda / rest / RequestValidationError
Class: RequestValidationError
This error is thrown when an invalid value was retrieved from a request.
Extends
Error
Constructors
Constructor
ts
new RequestValidationError(message, zodError?): RequestValidationError;
Parameters
Parameter | Type | Description |
---|---|---|
message | string | The message of the error. |
zodError? | ZodError <any > | If the error was caused by a Zod validation failure, the original Zod error will be provided here. |
Returns
RequestValidationError
Overrides
ts
Error.constructor
Properties
message
ts
readonly message: string;
The message of the error.
Inherited from
ts
Error.message
zodError?
ts
readonly optional zodError: ZodError<any>;
If the error was caused by a Zod validation failure, the original Zod error will be provided here.