Make 'incomplete GRPC request' errors easier to trace
Many of GRPC methods perform some amount of request validation and then immediately construct requests to be dispatched to other component via an inner GRPC client. When one of these requests contains a nil value the inner GRPC server being called may return a simple 'errIncompleteGRPCRequest' which is not wrapped by another error indicating the source.
For example, RA.AdministrativelyRevokeCertificate can return a simple errIncompleteGRPCRequest from three sources. The first is at the top of the method itself. The second and third are a little trickier; the call to RA.revokeCertificate on line 1886 results in two calls via inner GRPC clients that could return a simple errIncompleteGRPCRequest.
RA.AdministrativelyRevokeCertificate
https://github.com/letsencrypt/boulder/blob/7d4facc40363583c1a10a1b53813db772eb4f430/ra/ra.go#L1838-L1844
RA.AdministrativelyRevokeCertificate >> RA.revokeCertificate >> SA.RevokeCertificate
https://github.com/letsencrypt/boulder/blob/7d4facc40363583c1a10a1b53813db772eb4f430/ra/ra.go#L1886-L1890 https://github.com/letsencrypt/boulder/blob/7d4facc40363583c1a10a1b53813db772eb4f430/ra/ra.go#L1752-L1760 https://github.com/letsencrypt/boulder/blob/7d4facc40363583c1a10a1b53813db772eb4f430/sa/sa.go#L1709-L1712
RA.AdministrativelyRevokeCertificate >> RA.revokeCertificate >> SA.AddBlockedKey
https://github.com/letsencrypt/boulder/blob/7d4facc40363583c1a10a1b53813db772eb4f430/ra/ra.go#L1778-L1780 https://github.com/letsencrypt/boulder/blob/7d4facc40363583c1a10a1b53813db772eb4f430/sa/sa.go#L1951-L1954
When these happen across RPC boundaries, they get wrapped in a gRPC error message (with code = , rpc = etc). So this may be mainly an issue with the inmem wrappers. We could give them their own error wrapper type?
When these happen across RPC boundaries, they get wrapped in a gRPC error message (with
code =,rpc =etc). So this may be mainly an issue with theinmemwrappers. We could give them their own error wrapper type?
Ah, this makes a ton of sense. Yeah, I think that could work.
Closing this out. I'm pretty confident that it's not a big value add.