Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Millorar la gestió dels errors retornats pel bus #244

Open
alexm opened this issue Sep 6, 2023 · 0 comments
Open

Millorar la gestió dels errors retornats pel bus #244

alexm opened this issue Sep 6, 2023 · 0 comments

Comments

@alexm
Copy link
Member

alexm commented Sep 6, 2023

Traceback (most recent call last):
  File "/home/mailtoticket/mailtoticket/[mailtoticket.gmail.py](http://mailtoticket.gmail.py/)", line 64, in <module>
    if filtres.aplicar_filtres(mail):
  File "/home/mailtoticket/mailtoticket/filtres/__init__.py", line 52, in aplicar_filtres
    tractat = filtre.filtrar()
  File "/home/mailtoticket/mailtoticket/filtres/nou.py", line 79, in filtrar
    if SOAService.resultat_erroni(resultat):
  File "/home/mailtoticket/mailtoticket/soa/service.py", line 19, in resultat_erroni
    return resultat['codiRetorn'] != "1"
TypeError: string indices must be integers

Seria molt pràctic evitar aquests errors, mirant primer el tipus dels paràmetres a comparar o capturant l'excepció i mostrant els valors comparats per obtenir més detalls de l'error. Altrament, anem a cegues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant