You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by GitBox <gi...@apache.org> on 2022/09/02 08:39:58 UTC

[GitHub] [thrift] simon0-o commented on pull request #2469: THRIFT-5423: Support go parameter validation in IDL

simon0-o commented on PR #2469:
URL: https://github.com/apache/thrift/pull/2469#issuecomment-1235232391

   > Another suggestion, which can be done in a follow-up PR instead, but doing it in this PR will help a lot of the test code:
   > 
   > Define a `ValidationError` type in go library, and implement `Unwrap` on `tApplicationException` so that when a `TApplicationException` is validation error it can also unwrap to that, that way when checking for `ValidationError` you can use its fields to determine what's the check (e.g. `vt.const`) and what's the field that failed validation.
   
   sorry for the late reply, I have defined a `ValidationError` in application_exception.go and add a `NewValidationException` which is used to construct tApplicationExcetion with ValidationError. I also add a unwrap test in the validation test to make sure `Unwrap` works correctly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org