mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 02:17:05 +00:00
replace all common error responses with the new Context.StopWithError
Former-commit-id: 99b08a0b5564ef640456db12674cb37721f73ae3
This commit is contained in:
@@ -56,9 +56,7 @@ func TestStruct(t *testing.T) {
|
||||
type testStructErrorHandler struct{}
|
||||
|
||||
func (s *testStructErrorHandler) HandleError(ctx iris.Context, err error) {
|
||||
ctx.StatusCode(httptest.StatusConflict)
|
||||
ctx.WriteString(err.Error())
|
||||
ctx.StopExecution()
|
||||
ctx.StopWithError(httptest.StatusConflict, err)
|
||||
}
|
||||
|
||||
func (s *testStructErrorHandler) Handle(errText string) error {
|
||||
|
||||
Reference in New Issue
Block a user