Projet

Général

Profil

Development #40527

NotImplementedError: phone number u'688876074' is unsupported (no international prefix, no local trunk prefix)

Ajouté par Sentry Io il y a environ 4 ans. Mis à jour il y a environ 4 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
09 mars 2020
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

https://sentry.entrouvert.org/entrouvert/publik/issues/715/

NotImplementedError: phone number u'688876074' is unsupported (no international prefix, no local trunk prefix)
  File "passerelle/utils/jsonresponse.py", line 128, in api
    resp = f(*args, **kwargs)
  File "passerelle/views.py", line 467, in perform
    result = self.endpoint(request, **params)
  File "passerelle/sms/__init__.py", line 58, in send
    return {'data': self.send_msg(data['message'], data['from'], data['to'], stop=True)}
  File "passerelle/apps/ovh/models.py", line 88, in send_msg
    self.default_trunk_prefix)
  File "passerelle/sms/__init__.py", line 36, in clean_numbers
    'trunk prefix)' % number)

Error occurred while processing request

On peut peut-être mieux catcher l'erreur pour renvoyer une APIError propre au lieu d'une 500 ?


Fichiers

Révisions associées

Révision 09aa0b0a (diff)
Ajouté par Valentin Deniaud il y a environ 4 ans

base: raise APIError on invalid phone number (#40527)

Historique

#1

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

  • Projet changé de Suivi des traces à Passerelle
  • Description mis à jour (diff)
#2

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

  • Assigné à mis à Valentin Deniaud
#3

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

Remplacer bêtement l'exception suffit je pense, cette méthode étant toujours appelée depuis un endpoint.

#4

Mis à jour par Emmanuel Cazenave il y a environ 4 ans

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

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

  • Statut changé de Solution validée à Résolu (à déployer)
commit 09aa0b0a03c7f2406a2a6dcfd271383d09a771f1
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Wed Mar 11 11:18:35 2020 +0100

    base: raise APIError on invalid phone number (#40527)
#6

Mis à jour par Frédéric Péters il y a environ 4 ans

  • Statut changé de Résolu (à déployer) à Solution déployée

Formats disponibles : Atom PDF