[ 
https://issues.apache.org/jira/browse/THRIFT-5845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yuxuan Wang updated THRIFT-5845:
--------------------------------
    Summary: The write error for union fields should be TException  (was: The 
write error for union fields should be of type of TTransportException)

> The write error for union fields should be TException
> -----------------------------------------------------
>
>                 Key: THRIFT-5845
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5845
>             Project: Thrift
>          Issue Type: Task
>          Components: Go - Compiler
>    Affects Versions: 0.21.0
>            Reporter: Yuxuan Wang
>            Assignee: Yuxuan Wang
>            Priority: Major
>
> Currently, when writing an union field and not exactly one field of the union 
> is set, we just return a generic error:
> {code:go}
> return fmt.Errorf("%T write union: exactly one field must be set (%d set)", 
> p, c)
> {code}
> This makes it very hard for logic like client pool management to decide 
> whether a connection can be reused after an error. Making it return a 
> TTransportException would resolve the issue.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to