[
https://issues.apache.org/jira/browse/THRIFT-5833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yuxuan Wang updated THRIFT-5833:
--------------------------------
Fix Version/s: 0.22.0
> go: Combine I/O and original error in compiler generated Process functions
> --------------------------------------------------------------------------
>
> Key: THRIFT-5833
> URL: https://issues.apache.org/jira/browse/THRIFT-5833
> Project: Thrift
> Issue Type: Task
> Components: Go - Compiler
> Affects Versions: 0.21.0
> Reporter: Yuxuan Wang
> Assignee: Yuxuan Wang
> Priority: Major
> Fix For: 0.22.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Currently in compiler generated Process functions, we treat I/O error of
> writing the response to the client as higher priority than the error returned
> by the endpoint. If there're any I/O error, we return that instead of the
> original error returned by the endpoint. Server middlewares
> (ProcessorMiddleware) only have access to the error returned by Process
> function, so this means they won't always have access to the original error
> returned by the endpoint (when I/O error happens).
> Now go supports multiple-error wrapping since go 1.20, we should return a
> combined I/O + original error in such cases.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)