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

Fix ErrorWriter to be codec agnostic

Open emcfarlane opened this issue 1 year ago • 0 comments

This PR changes the ErrorWriter to be more lenient with classifying protocols. Errors codecs are agnostic to the codec used. Therefore we avoid checking the codec in classifying the request. IsSupported will return true for an unknown codec which allows the server to encode a better error message to the client. If not supported a 415 error response could be used to match gRPC server like handling. If not supported and trying to write an error the ErrorWriter will default to connects unary encoding (consistent with current behaviour).

Fixes #689

emcfarlane avatar Feb 23 '24 17:02 emcfarlane