3.2 常见错误code说明
约 266 字小于 1 分钟
2025-11-03
注意
- 当klook调用接入方的接口时(验价,下单,订单详情,预取消,取消等),如果下述错误code不满足,接入方可以自定义错误code和错误message,klook会针对每个流程都有个错误code mapping,最终将错误code转换成对应的状态,比如"bookSoldOut","checkPriceChanged"等.
返回错误格式
{
"message": "",//kong 错误返回
"success": false,
"error": {
"code": "9999",
"message": "xxxxxxx"
},
"result": { // 可能是一个列表,可以是空
........
}
}错误示例
{
"success": false,
"error": {
"code": "9999",
"message": "xxxxxxx"
}
}常规错误 code
| 错误类型 | error.code | error.message | message | 说明 |
|---|---|---|---|---|
| kong | API rate limit exceeded | 限流 | ||
| kong | Unauthorized | header 缺少 Authorization | ||
| kong | Invalid authentication credentials | header Authorization 不正确 | ||
| kong | Your IP address is not allowed | ip 地址限制 | ||
| 常规 | 9999 | xxxxxxx | 系统默认错误 | |
| 常规 | 1001 | Operation failed | 操作错误 | |
| 常规 | 1002 | Authorization error | 认证错误 | |
| 常规 | 1003 | supplierCode error or openApiKey error | ||
| 常规 | 1004 | request parameter error | 请求入参错误 | |
| ... | ... | ... | 待补充中 |
