From 08f42a7b96a87b02287781f60c6c0edd65f2aba9 Mon Sep 17 00:00:00 2001 From: "M. Mert Yildiran" Date: Sun, 19 Mar 2023 06:08:55 +0300 Subject: [PATCH] :bug: Replace another `panic` with a error log in `pro` command --- cmd/pro.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/pro.go b/cmd/pro.go index 2efb95214..e4dfee6ff 100644 --- a/cmd/pro.go +++ b/cmd/pro.go @@ -98,7 +98,9 @@ func runLicenseRecieverServer() { ginApp.POST("/", func(c *gin.Context) { data, err := ioutil.ReadAll(c.Request.Body) if err != nil { - panic(err) + log.Error().Err(err).Send() + c.AbortWithStatus(http.StatusBadRequest) + return } licenseKey := string(data)