docs: define REST response semantics

This commit is contained in:
Ed1s0nZ committed 2026-10-10 17:59:52 +08:00
1 parent b2b76b7193
commit c629b08b0d
1 file changed
+4
+4
View File
@@ -12,3 +12,7 @@
## F1:已确认需求
用户明确要求:C2 Profile 和 WebShell 删除不存在对象返回 404,不暴露底层 SQL 错误;漏洞和批量任务列表无匹配时返回 [];补充必要验证。单对象读取、其他模块错误处理、鉴权及部署不在本次范围。真实数据库失败仍为 500。
## F2:接口设计
保持原 JSON 字段名、成功删除响应和分页字段。C2 缺失映射为 {"error":"profile not found"},WebShell 保持 connection not found。两者真正数据库错误记录内部日志,对外为稳定通用文案。列表在产生集合的现有方法初始化非 nil 空切片,覆盖数据库和内存路径。兼容性:消费者将收到 [] 而非 null;该变更为用户明确要求。