Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Commit 13b8874

Browse files
committed
minor changes according to PR comments
1 parent 510a235 commit 13b8874

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

api/ccache.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -91,18 +91,16 @@ func (s *Server) ccacheDeleteRemote(ctx context.Context, req *models.CCacheDelet
9191
buf, err := peer.Post(ctx, "ccacheDeleteRemote", "/ccache/delete", *req)
9292
if err != nil {
9393
log.Error(4, "HTTP ccacheDelete error querying %s/ccache/delete: %q", peer.GetName(), err)
94-
if res.Errors == 0 {
95-
res.FirstError = err.Error()
96-
}
94+
res.FirstError = err.Error()
9795
res.Errors++
9896
return res
9997
}
10098

10199
err = json.Unmarshal(buf, &res)
102100
if err != nil {
103101
log.Error(4, "HTTP ccacheDelete error unmarshaling body from %s/ccache/delete: %q", peer.GetName(), err)
102+
res.FirstError = err.Error()
104103
res.Errors++
105-
return res
106104
}
107105

108106
return res

0 commit comments

Comments
 (0)