cloudwego/thrift-gen-validator

about returning custom messages

q2wdqea opened this issue · 2 comments

I want to return custom message content when defining idl, business needs, look at the following pictures

image

You can assert the validator error type and wrap your own biz error.

validator error should be a concrete type, including full path of the field and the error message