Anujcodecraft / Anujcodecraft/notes-online

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

Open
#33 0 comments 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.