@kg-ai/kugou-skill 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +198 -198
- package/SKILL.md +246 -223
- package/bin/darwin-arm64/kugou-cli +0 -0
- package/bin/darwin-x64/kugou-cli +0 -0
- package/bin/linux-arm64/kugou-cli +0 -0
- package/bin/linux-x64/kugou-cli +0 -0
- package/bin/win32-x64/kugou-cli.exe +0 -0
- package/package.json +1 -1
- package/references/control.md +676 -680
- package/references/error-handling.md +22 -22
- package/references/music.md +526 -526
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
# 错误处理
|
|
2
|
-
|
|
3
|
-
错误信息输出到 stderr,程序 exit code 为 1:
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
kugou-cli music search "xxx" 2>&1
|
|
7
|
-
echo $? # 非 0 表示出错
|
|
8
|
-
```
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## 常见错误及处理
|
|
13
|
-
|
|
14
|
-
| 错误信息 | 原因 | 处理方式 |
|
|
15
|
-
|---------|------|---------|
|
|
16
|
-
| `账号登录过期,请重新登录` | 登录态已过期(errcode 语义由上游约定)。CLI 已**自动**清理本地登录态 | 引导用户重新登录:`kugou-cli auth login`(扫码)或 `kugou-cli auth set-secret "<新 secret>"` |
|
|
17
|
-
| `not logged in` / `auth file not found` | 未登录 | 引导用户执行 `kugou-cli auth login` |
|
|
18
|
-
| `HTTP error: 400` | 请求参数有误 | 检查命令参数是否正确 |
|
|
19
|
-
| `HTTP error: 500` | 服务端错误 | 稍后重试,或告知用户 |
|
|
20
|
-
| `API error: <errmsg> (code=<N>)` | 业务错误(上游 errcode ≠ 0) | 根据 errmsg 提示用户 |
|
|
21
|
-
| `network error: ...` | 网络连接问题 | 检查网络,可尝试 `--proxy` |
|
|
22
|
-
| `failed to get device info` | 设备信息获取失败(仅 control) | 运行时环境异常,检查权限 |
|
|
1
|
+
# 错误处理
|
|
2
|
+
|
|
3
|
+
错误信息输出到 stderr,程序 exit code 为 1:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
kugou-cli music search "xxx" 2>&1
|
|
7
|
+
echo $? # 非 0 表示出错
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 常见错误及处理
|
|
13
|
+
|
|
14
|
+
| 错误信息 | 原因 | 处理方式 |
|
|
15
|
+
|---------|------|---------|
|
|
16
|
+
| `账号登录过期,请重新登录` | 登录态已过期(errcode 语义由上游约定)。CLI 已**自动**清理本地登录态 | 引导用户重新登录:`kugou-cli auth login`(扫码)或 `kugou-cli auth set-secret "<新 secret>"` |
|
|
17
|
+
| `not logged in` / `auth file not found` | 未登录 | 引导用户执行 `kugou-cli auth login` |
|
|
18
|
+
| `HTTP error: 400` | 请求参数有误 | 检查命令参数是否正确 |
|
|
19
|
+
| `HTTP error: 500` | 服务端错误 | 稍后重试,或告知用户 |
|
|
20
|
+
| `API error: <errmsg> (code=<N>)` | 业务错误(上游 errcode ≠ 0) | 根据 errmsg 提示用户 |
|
|
21
|
+
| `network error: ...` | 网络连接问题 | 检查网络,可尝试 `--proxy` |
|
|
22
|
+
| `failed to get device info` | 设备信息获取失败(仅 control) | 运行时环境异常,检查权限 |
|