fix(canvas): 资源引用 - 校验递归素材并修复断链

This commit is contained in:
ddCat committed 2026-09-24 00:12:53 +08:00
1 parent f98184519d
commit 5b38272654
24 files changed
+697 -218

No files matched your search

+8 -1
View File
@@ -67,7 +67,14 @@ func writeAppError(c *gin.Context, appErr *service.AppError) {
}
logHandlerError(c, appErr.Status, diagnosticErr)
}
writeFailure(c, appErr.Status, code, reason, message)
body := gin.H{"code": code, "data": nil, "msg": message}
if reason != "" {
body["reason"] = reason
}
if len(appErr.Details) > 0 {
body["details"] = appErr.Details
}
c.JSON(appErr.Status, body)
}
// failInternal 保留真实 HTTP 状态,但绝不把未分类错误原文写入响应。