[
https://issues.apache.org/jira/browse/THRIFT-5605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17888476#comment-17888476
]
Jens Geyer commented on THRIFT-5605:
------------------------------------
But returning an exceoptiin as a resuilt value (or a part of it) is technically
illegal IDL. An exceoptin is not a normal struct.
> Go client middleware has no (easy) access to IDL exceptions
> -----------------------------------------------------------
>
> Key: THRIFT-5605
> URL: https://issues.apache.org/jira/browse/THRIFT-5605
> Project: Thrift
> Issue Type: Bug
> Components: Go - Library
> Affects Versions: 0.16.0
> Reporter: Yuxuan Wang
> Assignee: Yuxuan Wang
> Priority: Minor
> Fix For: 0.17.0
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> Similar to THRIFT-5527, this is the issue on the client side.
> But unlike THRIFT-5527, this cannot be resolved by a fix on the compiler
> code. We managed to write a [reflect based helper
> function|https://github.com/reddit/baseplate.go/blob/e34b108af09beab61f33126dfacf075ff58f5116/thriftbp/client_middlewares.go#L404-L443]
> to extract the IDL exceptions out of the result TStruct, I think upstream
> that helper function to be a provided ClientMiddleware would be helpful.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)