NotFound emits an error 404 to the client, using the specific custom error error handler. Note that you may need to call ctx.StopExecution() if you don't want the next handlers to be executed. Next handlers are being executed on iris because you can alt the error code and change it to a more specifi
()
| 1476 | // users := app.Party("/users") |
| 1477 | // users.Done(func(ctx iris.Context){ if ctx.GetStatusCode() == 400 { /* custom error code for /users */ }}) |
| 1478 | func (ctx *Context) NotFound() { |
| 1479 | ctx.StatusCode(http.StatusNotFound) |
| 1480 | } |
| 1481 | |
| 1482 | // GetStatusCode returns the current status code of the response. |
| 1483 | // Look StatusCode too. |
no test coverage detected