Type Alias AutoValidateRequestResponseConfig
AutoValidateRequestResponseConfig:
| boolean
| {
errorResponse?: {
payload: | Record<string, any>
| ((errors: ErrorObject<any>[]) => Record<string, any>);
status: number;
};
onError?: (
request: FastifyRequest,
reply: FastifyReply,
errors?: ErrorObject<any>[],
) => FastifyReply | undefined;
validate?: boolean;
}
Type Declaration
- boolean
- {
errorResponse?: {
payload:
| Record<string, any>
| ((errors: ErrorObject<any>[]) => Record<string, any>);
status: number;
};
onError?: (
request: FastifyRequest,
reply: FastifyReply,
errors?: ErrorObject<any>[],
) => FastifyReply | undefined;
validate?: boolean;
}OptionalerrorResponse?: {
payload:
| Record<string, any>
| ((errors: ErrorObject<any>[]) => Record<string, any>);
status: number;
}
OptionalonError?: (
request: FastifyRequest,
reply: FastifyReply,
errors?: ErrorObject<any>[],
) => FastifyReply | undefined
Optionalvalidate?: boolean
Deprecated
use
onErrorinstead