Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Xsxdot opened this issue Jun 29, 2024 · 0 comments
Assignees

Comments

@Xsxdot
Copy link

Xsxdot commented Jun 29, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants