diff --git a/internal/distributed/proxy/httpserver/timeout_middleware.go b/internal/distributed/proxy/httpserver/timeout_middleware.go index a6a052a57e..e2211f24dd 100644 --- a/internal/distributed/proxy/httpserver/timeout_middleware.go +++ b/internal/distributed/proxy/httpserver/timeout_middleware.go @@ -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.