feat: 添加 caused_by 字段以便客户端知道是什么情况

This commit is contained in:
CrescentLeaf
2025-10-08 15:13:11 +08:00
parent 5b64c6adcf
commit 23ad29fb2d
2 changed files with 10 additions and 3 deletions

View File

@@ -1,3 +1,6 @@
type ErrorCausedBy =
'NOT_IN_THIS_CHAT_MEMBER_LIST'
type ApiCallbackMessage = {
msg: string,
/**
@@ -11,5 +14,6 @@ type ApiCallbackMessage = {
*/
code: 200 | 400 | 401 | 403 | 404 | 500 | 501,
data?: { [key: string]: unknown },
caused_by?: ErrorCausedBy,
}
export default ApiCallbackMessage