This is the default error handler Iris uses for any error codes.
(ctx iris.Context)
| 24 | |
| 25 | // This is the default error handler Iris uses for any error codes. |
| 26 | func onErrorCode(ctx iris.Context) { |
| 27 | if err := ctx.GetErr(); err != nil { |
| 28 | ctx.WriteString(err.Error()) |
| 29 | } else { |
| 30 | ctx.WriteString(iris.StatusText(ctx.GetStatusCode())) |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | func handler(ctx iris.Context) { |
| 35 | ctx.Record() |
nothing calls this directly
no test coverage detected
searching dependent graphs…