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

No error will be reported for illegal JSON requests #4087

Open
lingcoder opened this issue Dec 30, 2024 · 0 comments
Open

No error will be reported for illegal JSON requests #4087

lingcoder opened this issue Dec 30, 2024 · 0 comments
Labels
bug It is confirmed a bug, but don't worry, we'll handle it.

Comments

@lingcoder
Copy link
Contributor

Go version

go version go1.23.3 windows/amd64

GoFrame version

v2.8.3

Can this bug be reproduced with the latest release?

Option Yes

What did you do?

使用默认的规范路由写法定义controller层出参入参,默认应该是application/json 请求。
前端传递了非法的JSON。gf没有任何错误提醒。

What did you see happen?

request := g.RequestFromCtx(ctx)
fmt.Println(request.GetBodyString())

d3c6b0f321c1d9bb44462dea43b55ce

What did you expect to see?

应该提示参数格式不对吧?

@lingcoder lingcoder added the bug It is confirmed a bug, but don't worry, we'll handle it. label Dec 30, 2024
@Issues-translate-bot Issues-translate-bot changed the title 非法的JSON请求不报错 No error will be reported for illegal JSON requests Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It is confirmed a bug, but don't worry, we'll handle it.
Projects
None yet
Development

No branches or pull requests

1 participant