Projet

Général

Profil

Development #51181

format des APIError (uniquement quand DEBUG = True ?)

Ajouté par Frédéric Péters il y a environ 3 ans. Mis à jour il y a environ 3 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
-
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&timestamp=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

0001-api-APIError-handling-51181.patch (10,2 ko) 0001-api-APIError-handling-51181.patch Lauréline Guérin, 18 février 2021 17:13

Révisions associées

Révision 5e94ddef (diff)
Ajouté par Lauréline Guérin il y a environ 3 ans

api: APIError handling (#51181)

Historique

#2

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

#3

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).

#4

Mis à jour par Lauréline Guérin il y a environ 3 ans

c'était ce que je comptais faire :)

#5

Mis à jour par Valentin Deniaud il y a environ 3 ans

  • Statut changé de Solution proposée à Solution validée
#6

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)
#7

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

Formats disponibles : Atom PDF