feat: add MCP error metadata handling and improve source policy resolution (#14270)

* feat: add MCP error metadata handling and improve source policy resolution

* fix: adjust height-diff for improved table layout
This commit is contained in:
蘭
2026-11-02 22:17:12 +08:00
committed by GitHub
parent 8e1b761f4c
commit e29679768b
68 changed files with 2613 additions and 997 deletions
+13
View File
@@ -0,0 +1,13 @@
package middleware
import (
"github.com/1Panel-dev/1Panel/agent/app/api/v2/helper"
"github.com/1Panel-dev/1Panel/agent/utils/mcpapi"
"github.com/gin-gonic/gin"
)
func MCPErrorMetadata() gin.HandlerFunc {
return helper.WithErrorMetadata(func(c *gin.Context, _ int, _ string, err error) {
mcpapi.SetBusinessErrorHeader(c.Request, c.Writer.Header(), err)
})
}