u
This commit is contained in:
1 parent
cf4291652a
commit
8408cf779f
20 files changed
+1400
-33
No files matched your search
@@ -0,0 +1,17 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/cloudwego/hertz/pkg/app"
|
||||
)
|
||||
|
||||
// Error 中间件
|
||||
func Error() app.HandlerFunc {
|
||||
return func(ctx context.Context, c *app.RequestContext) {
|
||||
c.Next(ctx)
|
||||
|
||||
if err := c.Errors.Last(); err != nil {
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user