Development #51181
format des APIError (uniquement quand DEBUG = True ?)
Début:
16 février 2021
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Non
Description
Sur un appel webservice depuis wcs, on obtient :
locals: action = ':stop' data = b'APIError at /api/agenda/lille/meetings/standard/datetimes/\ndate_start doit \xc3\xaatre au format YYYY-MM-DD\n\nRequest Method: GET\nRequest URL: https://chrono-lenord.test.entrouvert.org/api/agenda/lille/meetings/standard/datetimes/?date_start=25%2F02%2F2021&date_end=04%2F03%2F2021&orig=demarches-lenord.test.entrouvert.org&algo=sha256×tamp=2021-02-16T13%3A09%3A16Z&nonce=c7f088e5c3db932b605ac93ba7f500e&signature=myOcZE0BCqJlzLnd/EjLFhEO6TMDJjbeanc1GS6dDnU%3D\nDjango Version: 1.11.29\nPython Executable: /usr/bin/uwsgi-core\nPython Version: 3.7.3\nPython Path: [\'.\', \'\', \'/usr/lib/python37.zip\', \'/usr/lib/python3.7... ...nYou\'re seeing this error because you have DEBUG = True in your\nDjango settings file. Change that to False, and Django will\ndisplay a standard page generated by the handler for this status code.\n\n'
il y a peut-être moyen d'offrir quelque chose plus facilement exploitable.
Fichiers
Révisions associées
Historique
Mis à jour par Lauréline Guérin il y a environ 3 ans
- Assigné à mis à Lauréline Guérin
APIError est une exception custom qui doit être catchée pour renvoyer une err=1 propre
Mis à jour par Benjamin Dauvergne il y a environ 3 ans
Il me semble que c'est plus ou moins le même sujet que #51182 (on peut le fermer donc).
Mis à jour par Lauréline Guérin il y a environ 3 ans
- Fichier 0001-api-APIError-handling-51181.patch 0001-api-APIError-handling-51181.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
c'était ce que je comptais faire :)
Mis à jour par Valentin Deniaud il y a environ 3 ans
- Statut changé de Solution proposée à Solution validée
Mis à jour par Lauréline Guérin il y a environ 3 ans
- Statut changé de Solution validée à Résolu (à déployer)
commit 5e94ddeff35f37f235f6e724ce01e3069129e100 Author: Lauréline Guérin <zebuline@entrouvert.com> Date: Thu Feb 18 17:13:17 2021 +0100 api: APIError handling (#51181)
Mis à jour par Frédéric Péters il y a environ 3 ans
- Statut changé de Résolu (à déployer) à Solution déployée
api: APIError handling (#51181)