Bug #64328
api de création de fiche : crash 500 si le payload a un data qui n'est pas un dictionnaire
Début:
19 avril 2022
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Non
Description
Typiquement :
POST /api/cards/fiche-3/submit { "data": "foobar" } HTTP/1.1 500 Internal Server Error { "err": 1, "err_class": "AttributeError", "err_desc": "AttributeError: 'str' object has no attribute 'get'" }
Ou :
POST /api/cards/fiche-2/submit { "data": null } HTTP/1.1 500 Internal Server Error { "err": 1, "err_class": "TypeError", "err_desc": "TypeError: argument of type 'NoneType' is not iterable" }
On devrait plutôt renvoyer 400 quand "data" n'est pas un dictionnaire.
Fichiers
Révisions associées
Historique
Mis à jour par Frédéric Péters il y a presque 2 ans
- Statut changé de Nouveau à En cours
- Assigné à mis à Frédéric Péters
Mis à jour par Frédéric Péters il y a presque 2 ans
- Fichier 0001-api-add-basic-format-check-for-submit-API-64328.patch 0001-api-add-basic-format-check-for-submit-API-64328.patch ajouté
- Statut changé de En cours à Solution proposée
- Patch proposed changé de Non à Oui
Mis à jour par Lauréline Guérin il y a presque 2 ans
- Statut changé de Solution proposée à Solution validée
Mis à jour par Frédéric Péters il y a presque 2 ans
- Statut changé de Solution validée à Résolu (à déployer)
commit 99fb4d2e3d4540dbc7a0f766aacc1679e8443f53 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Fri May 6 10:52:54 2022 +0200 api: add basic format check for submit API (#64328)
Mis à jour par Transition automatique il y a presque 2 ans
- Statut changé de Résolu (à déployer) à Solution déployée
api: add basic format check for submit API (#64328)