enhance: serializes the resp body and attach some details (#39140)

#37611

Signed-off-by: lixinguo <xinguo.li@zilliz.com>
Co-authored-by: lixinguo <xinguo.li@zilliz.com>
pull/39299/head
smellthemoon 2025-01-17 11:21:02 +08:00 committed by GitHub
parent 9209a70bb6
commit c38bca8d80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -27,10 +27,11 @@ import (
"github.com/gin-gonic/gin"
mhttp "github.com/milvus-io/milvus/internal/http"
"github.com/milvus-io/milvus/pkg/util/merr"
)
func defaultResponse(c *gin.Context) {
c.String(http.StatusRequestTimeout, "timeout")
c.JSON(http.StatusRequestTimeout, gin.H{HTTPReturnCode: merr.TimeoutCode, HTTPReturnMessage: "request timeout"})
}
// BufferPool represents a pool of buffers.