This commit is contained in:
wjqserver 2025-06-10 21:37:53 +08:00
parent e6b54eedbf
commit ce5efae287
4 changed files with 39 additions and 19 deletions

2
ecw.go
View file

@ -136,7 +136,7 @@ func (ecw *errorCapturingResponseWriter) processAfterFileServer() {
ecw.ctx.Next()
} else {
// 调用用户自定义的 ErrorHandlerFunc, 由它负责完整的错误响应
ecw.errorHandlerFunc(ecw.ctx, ecw.Status())
ecw.errorHandlerFunc(ecw.ctx, ecw.Status(), errors.New("file server error"))
ecw.ctx.Abort()
}
}