ErrorHandler converts a [ReturnHandler] into a standard [http.Handler]. Errors are handled as specified by the [ReturnHandler.ServeHTTPReturn] method. When wrapped in a [LogHandler], panics are added to the [AccessLogRecord]; otherwise, panics continue up the stack.
(h ReturnHandler, opts ErrorOptions)
| 480 | // When wrapped in a [LogHandler], panics are added to the [AccessLogRecord]; |
| 481 | // otherwise, panics continue up the stack. |
| 482 | func ErrorHandler(h ReturnHandler, opts ErrorOptions) http.Handler { |
| 483 | return errorHandler{h, opts.withDefaults()} |
| 484 | } |
| 485 | |
| 486 | // errCallback is added to logHandler's request context so that errorHandler can |
| 487 | // pass errors back up the stack to logHandler. |
searching dependent graphs…