Sync change handlers report malformed changes as internal errors
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
- 69/100
Hướng nghiên cứu
Read the three named validation paths in contentcuration/viewsets/contentnode.py, base.py, and assessmentitem.py, then inspect the related sync change tests. Reproduce the malformed inputs listed in the issue and add regression tests for each. Done means each is reported as a validation error with a useful message and none is sent to Sentry.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Overview
Some sync change handlers raise exceptions other than DRF's ValidationError on malformed changes. The sync applier catches them, marks the change errored with "Internal server error", and reports each one to Sentry. The client gets no usable error, and Sentry fills with reports of client mistakes. Any channel editor can send these changes.
Complexity: Medium
Target branch: hotfixes
Context
All inputs below were reproduced:
ContentNodeSerializer.validatereadskind.kindwithout checkingkindis set. A contentnode create change with aparentand nokindraisesAttributeError: 'NoneType' object has no attribute 'kind'. An update change for a node that doesn't exist reaches the same line; #6412 covers that case.UpdateModelMixin._map_update_changecallschange["mods"].items(). An update change withmods: ["a"]raisesAttributeError.AssessmentItemSerializer.validate_answersandvalidate_hintscalljson.loadsand iterate the result unchecked.answers: "not json"raisesJSONDecodeError, andhints: "5"raisesTypeError.
The Change
- Each handler in Context should raise DRF
ValidationErrorfor these inputs, so the change is marked errored with a validation message and nothing is reported to Sentry.
Acceptance Criteria
General
- Each change in Context is marked errored with a message describing the problem, not "Internal server error".
- None of the changes in Context sends a report to Sentry.
Testing
- Each change in Context has a regression test.
AI usage
I scoped the audit and chose the validation strategy in #6387. Claude Code found and reproduced these failures and drafted this issue.
- Ngôn ngữ chính
- Python
- Star
- 212
- Fork
- 321
- Merge trung bình
- 1 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 14
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của learningequality/studio
-
Community library status changes don't update `date_updated`Có thể đã có người làm @ArpitaSamanta10 đã nhận hôm nay. Đang mởcommunity-contribution-in-progress DEV: backend good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
learningequality/studio#6414 · 8 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DEV: backend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
learningequality/studio#6410 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DEV: backend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
learningequality/studio#6409 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DEV: backend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
learningequality/studio#6407 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Stripe webhook accepts events when no webhook secret is configuredCó thể đã có người làm @adibmbrk đã nhận hôm nay. Đang mởcommunity-contribution-in-progress DEV: backend good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
learningequality/studio#6404 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của learningequality/studio
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
readthedocs/readthedocs-builder#73 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: ci bug good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
hffgzktbcc-blip/ounce-core#484 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
vllm-project/vllm-torchtpu#3395 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Hermes plugin: MITM-domain discovery misses the model: block (provider/base_url nested under model:) — traffic blind-tunnels silently, zero compressionCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
ranxianglei/billion-context#7063 ·
Maintainer thường phản hồi trong vòng 1 ngày