For starters, handle ValidationException.
Quite easy to get the validator's message.
As for determining which type of RestException to throw, use ErrorCode, if possible.
RuleFor(x => x.Property)
.WithErrorCode("400") // throws BadRequestRestException
.WithErrorCode(nameof(BadRequestRestException)) // throws BadRequestRestException
.WithErrorCode("BadRequest") // throws BadRequestRestException
For starters, handle
ValidationException.Quite easy to get the validator's message.
As for determining which type of RestException to throw, use
ErrorCode, if possible.