StopWithProblem stops the handlers chain, writes the status code and sends an application/problem+json response. See `iris.NewProblem` to build a "problem" value correctly. If the status code is a failure one then it will also fire the specified error code handler.
(statusCode int, problem Problem)
| 852 | // If the status code is a failure one then |
| 853 | // it will also fire the specified error code handler. |
| 854 | func (ctx *Context) StopWithProblem(statusCode int, problem Problem) error { |
| 855 | ctx.StopWithStatus(statusCode) |
| 856 | problem.Status(statusCode) |
| 857 | return ctx.Problem(problem) |
| 858 | } |
| 859 | |
| 860 | // +------------------------------------------------------------+ |
| 861 | // | Current "user/request" storage | |
no test coverage detected