Skip to content

[BUG] Container. GetErrorHandler (ct). HandleError (ct, err) in mvc was called twice consecutively #2474

Open
@Xsxdot

Description

@Xsxdot

Describe the bug

  1. Container. GetErrorHandler (ct). HandleError (ct, err) in mvc was called twice consecutively
  2. When non-pointer parameters are defined in the controller structure, many unexpected errors may occur. For example, POST and DELETE requests may result in EOF, which is similar to the first bug.

To Reproduce
Steps to reproduce the behavior:

  1. type SomeController struct {
    Ctx iris.Context
    S service.AkService
    E *errorc.Err
    }

ak := adminApi.Party("/ak")
akMvc := mvc.New(ak)
akMvc.Register(service.AK, errorc.NewErrBuild("AKControllers"))
akMvc.Handle(new(admin.AK))

截屏2024-06-29 23 17 43

截屏2024-06-29 23 20 42

twice Errorhandle

截屏2024-06-29 22 56 13

second handle error

截屏2024-06-29 22 56 45

Desktop (please complete the following information):

  • OS: MacOS

iris.Version

  • e.g. v12.2.11

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions