yarpc-go icon indicating copy to clipboard operation
yarpc-go copied to clipboard

tchannel: map all yarpcerrors codes

Open azylman opened this issue 3 years ago • 2 comments

Today, if someone uses yarpcerrors with the tchannel transport (e.g. in a middleware) many error types get mapped to tchannel's unexpected-error error code. Systems assume that unexpected-error indicates a server error, so this causes inaccuracies in metrics, logging, SLA reporting, etc.

This PR maps all yarpcerrors codes to a corresponding tchannel error code. Most of the missing ones were client errors, so in most cases the closest tchannel error code was ErrCodeBadRequest.

azylman avatar Dec 07 '21 20:12 azylman

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Dec 07 '21 20:12 CLAassistant

Looks good to me. I agree YARPC should support all the error codes for all the protocols.

YARPC codes are described in yarpcerrors/codes.go.

jkanywhere avatar Dec 07 '21 21:12 jkanywhere