Three endpoints answer 500 to malformed input instead of 400
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- nodejs, openapi, typescript
- Ambito
- backend-api-design
Direzione di ricerca
Start from the OpenAPI document mentioned in the issue and locate the controllers for /api/v1/leave/calendar, /api/v1/notifications/devices and /api/v1/files/upload in the NestJS app, then check how the global validation pipe and each handler's DTO treat a missing query string, empty body and wrong Content-Type. Reproduce each call first to confirm the 500, then make the handlers reject with VALIDATION_FAILED naming the missing from/to dates or the absent file part. Done means all three return 400 (or 415 for the upload) with a useful message and route-level tests cover the malformed cases.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Found in the Pilot A gate (QA, main 147829f). Synthetic data only. No security impact: the production error body is the generic INTERNAL_ERROR ("An unexpected error occurred") with a request id, no stack.
Each call is made as a signed-in employee (any role gives the same answer).
| Call | Actual | Expected |
|---|---|---|
GET /api/v1/leave/calendar with no from and to |
500 INTERNAL_ERROR |
400 VALIDATION_FAILED naming the missing dates (the same call with ?from=2026-11-01&to=2026-12-31 works) |
DELETE /api/v1/notifications/devices with no body |
500 INTERNAL_ERROR |
400 VALIDATION_FAILED |
POST /api/v1/files/upload with Content-Type: application/json and body {} (not multipart) |
500 INTERNAL_ERROR |
400 or 415 ("send one part named file") |
Found by sending an empty body or no query string to all 249 routes of the OpenAPI document with each role; these three were the only 5xx answers.
A caller who forgets a parameter should be told which one; the 500 also shows up in error monitoring as a fault in Cwork.
- Lingua principale
- TypeScript
- Stelle
- 0
- Fork
- 0
- Merge medio
- 45m
- PR unite (30g)
- 37
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di SuruchBoss/Cwork
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
SuruchBoss/Cwork#130 ·
I maintainer di solito rispondono entro 1 giorno
-
P1
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
SuruchBoss/Cwork#90 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue P3 phase-E
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
SuruchBoss/Cwork#50 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue mobile P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
SuruchBoss/Cwork#11 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 1-2 giorni Idoneità per principianti 35/100
SuruchBoss/Cwork#124 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di SuruchBoss/Cwork
Issue simili
-
content triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
tensorflow/tfjs#8754 ·
-
tool-submission
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 83/100
BraveOPotato/NoSignups#2348 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
code-yeongyu/oh-my-openagent#12784 ·
I maintainer di solito rispondono entro 1 giorno
-
external-issue to-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 71/100
I maintainer di solito rispondono entro 1 giorno