fix: mask sensitive information in error messages and refine task retrieval query

This commit is contained in:
CaIon
2025-10-12 12:25:11 +08:00
parent 77f8e51b56
commit c13bb67360
2 changed files with 3 additions and 2 deletions

View File

@@ -142,7 +142,8 @@ func TaskErrorWrapper(err error, code string, statusCode int) *dto.TaskError {
lowerText := strings.ToLower(text)
if strings.Contains(lowerText, "post") || strings.Contains(lowerText, "dial") || strings.Contains(lowerText, "http") {
common.SysLog(fmt.Sprintf("error: %s", text))
text = "请求上游地址失败"
//text = "请求上游地址失败"
text = common.MaskSensitiveInfo(text)
}
//避免暴露内部错误
taskError := &dto.TaskError{