Anujcodecraft / Anujcodecraft/notes-online

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

Aperta
#33 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug good first issue NodeJS ReactJs
Lingua principale
JavaScript
Stelle
7
Fork
7
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### 🐛 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\""
}

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.