// AddVtGateErrorToBeginResponse will mutate a BeginResponse struct to fill in the Err // field with details from the VTGate error. func AddVtGateErrorToBeginResponse(err error, reply *proto.BeginResponse) { if err == nil { return } reply.Err = rpcErrFromVtGateError(err) }