code: func wrapError(ctx context.Context, err error) error {
  	if err == nil {
  		return nil
  	}
  	if berr, ok := err.(*berrors.BoulderError); ok {
  		// Ignoring the error return here is safe because if setting the metadata
  		// fails, we'll still return an error, but it will be interpreted on the
  		// other side as an InternalServerError instead of a more specific one.
  		_ = grpc.SetTrailer(ctx, metadata.Pairs("errortype", strconv.Itoa(int(berr.Type))))
  		return grpc.Errorf(codes.Unknown, err.Error())
  	}
  	return grpc.Errorf(codes.Unknown, err.Error())
  }
docs: // wrapError wraps the internal error types we use for transport across the gRPC
  // layer and appends an appropriate errortype to the gRPC trailer via the provided
  // context. errors.BoulderError error types are encoded using the grpc/metadata
  // in the context.Context for the RPC which is considered to be the 'proper'
  // method of encoding custom error types (grpc/grpc#4543 and grpc/grpc-go#478)