Skip to content

Commit 660f7a5

Browse files
committed
add DisableErrorHandler parameter to doc
1 parent 5e8c246 commit 660f7a5

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

website/docs/middleware/recover.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,25 @@ RecoverConfig struct {
5959
// LogErrorFunc defines a function for custom logging in the middleware.
6060
// If it's set you don't need to provide LogLevel for config.
6161
LogErrorFunc LogErrorFunc
62+
63+
// DisableErrorHandler disables the call to centralized HTTPErrorHandler.
64+
// The recovered error is then passed back to upstream middleware, instead of swallowing the error.
65+
// Optional. Default value false.
66+
DisableErrorHandler bool `yaml:"disable_error_handler"`
67+
6268
}
6369
```
6470

6571
### Default Configuration
6672

6773
```go
6874
DefaultRecoverConfig = RecoverConfig{
69-
Skipper: DefaultSkipper,
70-
StackSize: 4 << 10, // 4 KB
71-
DisableStackAll: false,
72-
DisablePrintStack: false,
73-
LogLevel: 0,
74-
LogErrorFunc: nil,
75+
Skipper: DefaultSkipper,
76+
StackSize: 4 << 10, // 4 KB
77+
DisableStackAll: false,
78+
DisablePrintStack: false,
79+
LogLevel: 0,
80+
LogErrorFunc: nil,
81+
DisableErrorHandler: false,
7582
}
7683
```

0 commit comments

Comments
 (0)