cloudwego / cloudwego/kitex

service panic when the request json request body is invalid

Open
#433 4 comments 1 reaction 1 assignee Claimed by @daidai21 View on GitHub
Dominant language
Go
Stars
8k
Forks
918
Avg merge
1d 13h
Merged PRs (30d)
7

Description

**Describe the bug**
if the json request body is invalid, service will panic

want some way complained amicably

ex. req
```json
{
"user_ids":[
1234,
"5678"
]
}
```
coz "5678" is string, service panic and the log looks like that:

KITEX panic, err = interface conversion interface{} is string, not json.Number

related file:
kitex/pkg/generic/thrift.writeJSONNumber()

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.