fix: improve connection to postgres to raise business logic exception
And raises delay between each new try
This commit is contained in:
parent
0830c2f182
commit
f77cf3dd75
2 changed files with 18 additions and 7 deletions
10
app/consumer/src/exceptions.py
Normal file
10
app/consumer/src/exceptions.py
Normal 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"""
|
||||
Loading…
Add table
Add a link
Reference in a new issue