From 10ea8be4a52a73170d2d7b5720896fba2babc24d Mon Sep 17 00:00:00 2001 From: Gusted Date: Wed, 13 Jul 2022 17:39:19 +0000 Subject: [PATCH] Add missing return for when topic isn't found (#20351) Backport #20351 Add missing return to DeleteTopic API when the topic is not found. --- routers/api/v1/repo/topic.go | 1 + 1 file changed, 1 insertion(+) diff --git a/routers/api/v1/repo/topic.go b/routers/api/v1/repo/topic.go index 1cc2c50dc20d8..64dc763dc3811 100644 --- a/routers/api/v1/repo/topic.go +++ b/routers/api/v1/repo/topic.go @@ -240,6 +240,7 @@ func DeleteTopic(ctx *context.APIContext) { if topic == nil { ctx.NotFound() + return } ctx.Status(http.StatusNoContent)