service panic when the request json request body is invalid
Open
- 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
Assessment
This issue has not been assessed yet.