Null for a required rollout schedule or stage field answers 500 instead of 422

オープン
#1,537 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
postgresql, python
領域
api, database

調査の方向性

Reproduce by sending {"name": null} to PUT /api/v1/rollout-schedules/{schedule_id} against PostgreSQL and watch the 500 come from the NOT NULL database error. Read the rollout-schedule and stage update handlers, and how the earlier input refusal in #957 maps errors to 422. Done when each listed nullable field (name, max_percentage, status, stage_order, target_percentage, trigger_type) returns 422 naming the field, with no change to the D213 sweep's batch.

索引モデルが issue の本文から書いたものです。

説明

bug post-launch

Sending null for a required field on a rollout schedule or stage update answers 500 instead of 422.

What happens

Measured on main (ec7b3b8a) against PostgreSQL: PUT /api/v1/rollout-schedules/{schedule_id} with {"name": null} answers 500. The database refuses the NOT NULL column and the error is not mapped.

By reading, the same applies to:

  • max_percentage and status on the schedule update;
  • name, stage_order, target_percentage and trigger_type on the stage update.

Nothing is changed; the request fails as a whole.

Expected

422 naming the field, like the other input refusals. The same family as #957.

Priority

LOW under D213; after launch. The D213 bug sweep's rollout-schedule input batch makes sure its new error mapping leaves this path exactly as it is today, so this stays a separate fix.

主要言語
Python
スター
0
フォーク
4
平均マージ
5時間 19分
マージ済み PR(30日)
503

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Controlvar/controlvar のほかの issue

Controlvar/controlvar の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。