mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-13 03:42:35 -06:00
fix ineffassign
This actually revealed a missing error check. Since we've started a transaction at this point, I guessed that `s.abortAuto` is what we want there. Signed-off-by: Stephan Renatus <srenatus@chef.io>
This commit is contained in:
committed by
Torin Sandall
parent
97755b4f33
commit
bc0e04851d
@@ -936,6 +936,10 @@ func (s *Server) v1DataDelete(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
_, err = s.store.Read(ctx, txn, path)
|
||||
if err != nil {
|
||||
s.abortAuto(ctx, txn, w, err)
|
||||
return
|
||||
}
|
||||
|
||||
if err := s.store.Write(ctx, txn, storage.RemoveOp, path, nil); err != nil {
|
||||
s.abortAuto(ctx, txn, w, err)
|
||||
|
||||
Reference in New Issue
Block a user