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

注解校验参数异常无法捕获 #133

Open
lzbingsg opened this issue Aug 19, 2023 · 1 comment
Open

注解校验参数异常无法捕获 #133

lzbingsg opened this issue Aug 19, 2023 · 1 comment

Comments

@lzbingsg
Copy link

image

  1. 使用@Body()注解校验参数,校验不通过抛出异常无法捕获

  2. 使用 throw new MidwayValidationError("测试1", 500, "")这样抛出异常没问题
    是我使用得不正确吗

@lzbingsg
Copy link
Author

我看了base模块的登录代码,也是这样的写法,但是可以捕获到异常

@lzbingsg lzbingsg changed the title 注解校验参数异常无法铺货 注解校验参数异常无法捕获 Aug 19, 2023
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

1 participant