Sync change handlers report malformed changes as internal errors
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 69/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Python
- Étoiles
- 212
- Forks
- 321
- Merge moyen
- 1 j 7 h
- PR mergées (30 j)
- 14
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de learningequality/studio
-
Community library status changes don't update `date_updated`Peut-être pris @LightCreator1007 l’a pris il y a 1 jour. OuverteDEV: backend good first issue help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
learningequality/studio#6414 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
DEV: backend
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
learningequality/studio#6410 ·
Les mainteneurs répondent en général sous 1 jour
-
DEV: backend
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
learningequality/studio#6409 ·
Les mainteneurs répondent en général sous 1 jour
-
DEV: backend
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
learningequality/studio#6407 ·
Les mainteneurs répondent en général sous 1 jour
-
DEV: backend good first issue help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
learningequality/studio#6404 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de learningequality/studio
Issues similaires
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
canonical/paas-charm#407 · 1 commentaire ·
Les mainteneurs répondent en général sous 5 jours
-
bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
FAIRmat-NFDI/pynxtools-spm#136 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement tooling
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 1 jour
-
`read_nexus` entry point points to a function that no longer existsPeut-être pris @RubelMozumder l’a pris aujourd’hui. Ouverteannotator bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
FAIRmat-NFDI/pynxtools#876 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
[Bug]: HTTP 499 (Client Closed Request) is classified as a non-retryable format_error, so a mid-flight abort fails the turn over instead of retryingPeut-être pris @yipinghuang1991 l’a pris aujourd’hui. Ouvertecomp/agent P2 type/bug
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
NousResearch/hermes-agent#156837 ·
Les mainteneurs répondent en général sous 1 jour