Projet

Général

Profil

Bug #64328

Mis à jour par Thomas Noël il y a environ 2 ans

Typiquement :
<pre>
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'"
}
</pre>

Ou :
<pre>
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"
}
</pre>

On Tout est bien... sauf qu'on devrait plutôt renvoyer 400 quand "data" n'est pas un dictionnaire. des 200.

Retour