refactor: 去掉 GetDerivatives 的假 error 返回 + 同步 API 文档

GetDerivatives 签名里的 error 返回永远是 nil,controller 那段 if err != nil
是死分支,会误导调用方以为存在"全失败"语义。当前产品策略是 best-effort
response:局部失败 → warnings,bundle 永远非 nil,HTTP 永远 200。
等 Hermes 上游真要求"全失败 → 5xx"时再重新引入 error 返回。

同时把 docs/dev.md §13.5 示例补上 warnings 字段(上次重构遗漏的文档同步)。
This commit is contained in:
dela
2026-05-24 17:57:08 +08:00
parent f3dc4d0939
commit 05dc2ef0e7
3 changed files with 5 additions and 7 deletions

View File

@@ -964,7 +964,8 @@ Response:
"global": [],
"topTraderPosition": []
},
"takerBuySellVolume": []
"takerBuySellVolume": [],
"warnings": []
}
```