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

Đang mở
#1,537 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
42/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
postgresql, python
Lĩnh vực
api, database

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
0
Fork
4
Merge trung bình
5 giờ 36 phút
Pull request đã merge (30 ngày)
509

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Controlvar/controlvar

Tất cả issue của Controlvar/controlvar

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.