Sync change handlers report malformed changes as internal errors

Ouverte
#6,397 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

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
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
django, python
Domaine
api, backend, testing

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

DEV: backend

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:

The Change
  • Each handler in Context should raise DRF ValidationError for 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

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de learningequality/studio

Toutes les issues de learningequality/studio

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.