MCPcopy Create free account
hub / github.com/kataras/iris / handler

Function handler

_examples/routing/http-errors/reset-body/main.go:34–42  ·  view source on GitHub ↗
(ctx iris.Context)

Source from the content-addressed store, hash-verified

32}
33
34func handler(ctx iris.Context) {
35 ctx.Record()
36
37 ctx.WriteString("This should NOT be written")
38
39 // [....something bad happened after we "write"]
40 err := fmt.Errorf("custom error")
41 ctx.StopWithError(iris.StatusBadRequest, err)
42}

Callers

nothing calls this directly

Calls 4

RecordMethod · 0.80
WriteStringMethod · 0.80
ErrorfMethod · 0.80
StopWithErrorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…