From 7857fa2cfc5388fa1f5787eea473ab900f51299a Mon Sep 17 00:00:00 2001 From: parasssh Date: Wed, 2 Sep 2020 15:58:25 -0700 Subject: [PATCH] fix(dgraph): sentry nil pointer check (#6372) --- edgraph/server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/edgraph/server.go b/edgraph/server.go index 2132807983a..1e4678972ee 100644 --- a/edgraph/server.go +++ b/edgraph/server.go @@ -495,6 +495,9 @@ func (s *Server) doMutate(ctx context.Context, qc *queryContext, resp *api.Respo if x.WorkerConfig.LudicrousMode { // Mutations are automatically committed in case of ludicrous mode, so we don't // need to manually commit. + if resp.Txn == nil { + return errors.Wrapf(err, "Txn Context is nil") + } resp.Txn.Keys = resp.Txn.Keys[:0] resp.Txn.CommitTs = qc.req.StartTs return err