Anujcodecraft/notes-online
## ❌ Upvoting PYQ Fails – `branch` field casting error
Aberta
#33 aberto em 5 de jul. de 2025
NodeJSReactJsbuggood first issue
Métricas do repositório
- Stars
- (7 estrelas)
- Métricas de merge de PR
- (Métricas PR pendentes)
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):
{
"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\""
}