fix: improve connection to postgres to raise business logic exception

And raises delay between each new try
This commit is contained in:
Alexis Fourmaux 2026-05-09 17:25:02 +02:00
parent 0830c2f182
commit f77cf3dd75
2 changed files with 18 additions and 7 deletions

View file

@ -0,0 +1,10 @@
# domain/exceptions.py (ou dans domain.py directement)
class InfrastructureError(Exception):
"""Erreur technique levée par un adapter"""
class DatabaseConnectionError(InfrastructureError):
"""Impossible de se connecter à la db"""
class MessageBrokerError(InfrastructureError):
"""Impossible de se connecter au broker MQTT"""