post.addRemovalNote documentation incorrect

未關閉 適合新手
#296 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
1/5
預估耗時
1 小時以內
新手友好度
85/100
Issue 類型
文件
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
typescript
領域
documentation

研究方向

找出post.addRemovalNote的文件項目,並根據省略modNote時回報的錯誤,確認modNote是否為選填項目。先找出方法文件和附近的範例;更新說明,使其符合要求的行為。完成條件是文件不再稱modNote為選填項目,並正確說明其必要性。

由索引模型根據 Issue 內容生成。

描述

The documentation says that modNote is optional, but if it is missing, it gives the following error:

Error: 3 INVALID_ARGUMENT: Bad request: JSON missing key: "mod_note"
Error in field: mod_note
at callErrorFromStatus (/srv/index.cjs:22338:21)
at Object.onReceiveStatus (/srv/index.cjs:23056:70)
at Object.onReceiveStatus (/srv/index.cjs:22859:140)
at Object.onReceiveStatus (/srv/index.cjs:22822:175)
at /srv/index.cjs:34279:74
at process.processTicksAndRejections (node:internal/process/task_queues:85:11)
for call at
at Client3.makeUnaryRequest (/srv/index.cjs:23026:32)
at /srv/index.cjs:189393:30
at /srv/index.cjs:189467:5
at new Promise ()
at CanaryingGrpcWrapper._GrpcWrapper_promiseWithGrpcCallback2 (/srv/index.cjs:189459:10)
at CanaryingGrpcWrapper.request (/srv/index.cjs:189392:109)
at GenericPluginClient.PostRemovalNote (/srv/index.cjs:189836:93)
at Qk.addRemovalNote (main.js:4:3991)
at e.addRemovalNote (main.js:4:17856)
at RI (main.js:10:1302) {
code: 3,
details: 'Bad request: JSON missing key: "mod_note"\nError in field: mod_note',
metadata: _Metadata {
internalRepr: Map(1) { 'grpc-status-details-bin' => [Array] },
options: {}
}
}

If I add a mod note, it works correctly.

主要語言
TypeScript
星號
217
分支
89
PR 合併指標
30 天內沒有已合併 PR

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

reddit/devvit 的其他 Issue

查看 reddit/devvit 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。