From 364bf0172d9fbac35e86964b6a3dd4736de538a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=99=E6=B3=93=E9=93=AE?= Date: Mon, 30 Jun 2025 18:10:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96errorCode=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/context.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/context.go b/server/context.go index c764ccfa..eeb0e964 100644 --- a/server/context.go +++ b/server/context.go @@ -131,7 +131,7 @@ func RenderSuccess(c *gin.Context, result interface{}) { func RenderError(c *gin.Context, err error) { log.Error().Err(err).Msgf("failed to %s", c.HandlerName()) - c.JSON(http.StatusOK, + c.JSON(http.StatusInternalServerError, HttpResponse{ Code: code.GetErrorCode(err), Message: "grey " + err.Error(), @@ -146,7 +146,7 @@ func RenderErrorInitDriver(c *gin.Context, err error) { if errCode == code.GeneralFail { errCode = code.GetErrorCode(code.MobileUIDriverError) } - c.JSON(http.StatusOK, + c.JSON(http.StatusInternalServerError, HttpResponse{ Code: errCode, Message: "grey init driver failed",