Three endpoints answer 500 to malformed input instead of 400
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- nodejs, openapi, typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 0
- フォーク
- 0
- 平均マージ
- 45分
- マージ済み PR(30日)
- 37
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SuruchBoss/Cwork のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
SuruchBoss/Cwork#130 ·
メンテナーはふだん 1 日以内に返信
-
P1
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
SuruchBoss/Cwork#90 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
documentation good first issue P3 phase-E
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
SuruchBoss/Cwork#50 ·
メンテナーはふだん 1 日以内に返信
-
good first issue mobile P2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
SuruchBoss/Cwork#11 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 1〜2日 初心者へのやさしさ 35/100
SuruchBoss/Cwork#124 ·
メンテナーはふだん 1 日以内に返信
SuruchBoss/Cwork の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
area/admin/user area/internationalization automated-triage issue/auto-triaged type/bug
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
grafana/grafana#137281 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
accessibility bug
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
Luen/crag-stats#429 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
Missing assertions to legacy Cafe Menu block tests対応中かも @mariamanbar が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
freeCodeCamp/freeCodeCamp#71624 ·
メンテナーはふだん 1 日以内に返信