Anujcodecraft/notes-online

## ❌ Upvoting PYQ Fails – `branch` field casting error

開放

#33 建立於 2025年7月5日

 (0 則留言) (0 個反應) (0 位負責人)JavaScript (7 個分叉)auto 404
NodeJSReactJsbuggood first issue

倉庫指標

星標
 (7 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

🐛 Description:

When trying to upvote a PYQ, a 400 Bad Request error is returned from the backend. The response suggests a validation failure related to the branch field.


💥 Error (from network tab):

{
  "error": "Failed to upvote PYQ",
  "details": "pyqs validation failed: branch: Cast to ObjectId failed for value \"CSE\" (type string) at path \"branch\" because of \"BSONError\""
}

貢獻者指南