-
Notifications
You must be signed in to change notification settings - Fork 280
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a2a8c47
commit 713b319
Showing
12 changed files
with
488 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# 错误与调试 | ||
|
||
## 错误码 | ||
|
||
## 有关 traceID | ||
|
||
在 openapi 的返回 http 头上,有一个 `X-Tps-trace-ID` 自定义头部,是平台的链路追踪 ID,如果开发者有无法自己定位的问题,需要找平台协助的时候,可以提取这个 ID,提交给平台方。 | ||
|
||
方便查询相关日志。 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# websocket | ||
|
||
### 错误码 code | ||
| 值 | 含义 | 是否可以重试 RESUME | 是否可以重试 IDENTIFY | | ||
| :-------------- | :------------------------------------- | :--- | :--- | | ||
| 4001 | 无效的 opcode | 否 | 否 | | ||
| 4002 | 无效的 payload | 否 | 否 | | ||
| 4007 | seq 错误 | 否 | **是** | | ||
| 4006 | 无效的 session id,无法继续 resume,请 identify | 否 | **是** | | ||
| 4008 | 发送 payload 过快,请重新连接,并遵守连接后返回的频控信息 | **是** | **是** | | ||
| 4009 | 连接过期,请重连并执行 resume 进行重新连接 | **是** | **是** | | ||
| 4010 | 无效的 shard | 否 | 否 | | ||
| 4011 | 连接需要处理的 guild 过多,请进行合理的分片 | 否 | 否 | | ||
| 4012 | 无效的 version | 否 | 否 | | ||
| 4013 | 无效的 intent | 否 | 否 | | ||
| 4014 | intent 无权限 | 否 | 否 | | ||
| 4014 | intent 无权限 | 否 | 否 | | ||
| 4900~4913| 内部错误,请重连 | 否 | **是** | | ||
| 4914| 机器人已下架,只允许连接沙箱环境,请断开连接,检验当前连接环境 | 否 | 否 | | ||
| 4915| 机器人已封禁,不允许连接,请断开连接,申请解封后再连接 | 否 | 否 | | ||
|
||
### 针对 websocket 错误码的简单处理逻辑 | ||
|
||
- 4009 可以重新发起 resume | ||
- 4914,4915 不可以连接,请联系官方解封 | ||
- 其他错误,请重新发起 identify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.