Anujcodecraft / Anujcodecraft/notes-online
## ❌ Upvoting PYQ Fails – `branch` field casting error
Open
bug
good first issue
NodeJS
ReactJs
- Dominant language
- JavaScript
- Stars
- 7
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
### 🐛 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):
```json
{
"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\""
}
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.