Projet

Général

Profil

Bug #75649

zeep.exceptions.Fault est toujours intercepté alors qu'il a été remplacé par paserelle.utils.soap.SOAPFault

Ajouté par Benjamin Dauvergne il y a environ un an. Mis à jour il y a environ un an.

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

0%

Temps estimé:
Patch proposed:
Non
Planning:
Non

Description

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

SOAPFault: SOAP service at https://portail-nantes-metropole.test.entrouvert.org/media/uploads/2023/03/17/demandebac_v2.wsdl returned an error "Unknown fault occured" 
  File "passerelle/utils/jsonresponse.py", line 128, in api
    resp = f(*args, **kwargs)
  File "passerelle/views.py", line 569, in perform
    result = self.endpoint(request, **params)
  File "passerelle/apps/soap/models.py", line 126, in method
    soap_response = getattr(self.client.service, method_name)(**payload)
  File "passerelle/utils/soap.py", line 71, in __call__
    raise SOAPFault(client, fault)

Révisions associées

Révision 1f93f550 (diff)
Ajouté par Benjamin Dauvergne il y a environ un an

utils/soap: handle case where Fault.detail is a byte string (#75649)

Révision 2de6325c (diff)
Ajouté par Benjamin Dauvergne il y a environ un an

misc: replace interception of zeep.exceptions.Fault (#75649)

  • replaced by no interception at all in some places, as SOAPError inherit
    from APIError
  • replaced by SOAPFault in cartads_cs as there was a custom handling of
    the soap Faults.
  • new SOAPValidationError error is added to handle translation to
    APIError with 400 status and not logging as an error of the connector.

Révision c7dcc2a5 (diff)
Ajouté par Benjamin Dauvergne il y a environ un an

misc: remove maelis connector (#75649)

Révision 57d2bb06 (diff)
Ajouté par Benjamin Dauvergne il y a environ un an

translation update (#75649)

Remove references to maelis connector's messages.

Historique

#1

Mis à jour par Benjamin Dauvergne il y a environ un an

  • Assigné à mis à Benjamin Dauvergne
#2

Mis à jour par Benjamin Dauvergne il y a environ un an

Mauvaise analyse, ça marche déjà parce que SOAPError est une APIError (sauf dans cartads où il faut un petit fix) ici c'est juste que Fault.detail est parfois une chaîne 'bytes' vu le code dans zeep, en plus d'être un noeud elementtree :

$ grep -B4 detail= src/zeep/wsdl/bindings/soap.py
            raise Fault(
                message="Unknown fault occured",
                code=None,
                actor=None,
                detail=etree_to_string(doc),
--
        raise Fault(
            message=get_text("faultstring"),
            code=get_text("faultcode"),
            actor=get_text("faultactor"),
            detail=fault_node.find("detail", namespaces=fault_node.nsmap),
--
            raise Fault(
                message="Unknown fault occured",
                code=None,
                actor=None,
                detail=etree_to_string(doc),
--
        raise Fault(
            message=message,
            code=code,
            actor=None,
            detail=detail_node,

#3

Mis à jour par Robot Gitea il y a environ un an

  • Statut changé de Nouveau à Solution proposée

Benjamin Dauvergne (bdauvergne) a ouvert une pull request sur Gitea concernant cette demande :

#4

Mis à jour par Robot Gitea il y a environ un an

  • Statut changé de Solution proposée à En cours

Benjamin Dauvergne (bdauvergne) a commencé à travailler sur une pull request sur Gitea concernant cette demande :

#5

Mis à jour par Robot Gitea il y a environ un an

  • Statut changé de En cours à Solution proposée
#6

Mis à jour par Benjamin Dauvergne il y a environ un an

J'en ai profité pour flinguer le vieux connecteur maelis au passage, je ne pense pas qu'il serve encore à quelque chose (c'est pour m'éviter le mettre à jour pour rien ici).

#7

Mis à jour par Robot Gitea il y a environ un an

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

Nicolas Roche (nroche) a approuvé une pull request sur Gitea concernant cette demande :

#8

Mis à jour par Robot Gitea il y a environ un an

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

Benjamin Dauvergne (bdauvergne) a mergé une pull request sur Gitea concernant cette demande :

#9

Mis à jour par Transition automatique il y a environ un an

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

Mis à jour par Transition automatique il y a 11 mois

Automatic expiration

Formats disponibles : Atom PDF