Coverage for src/lexigram/notification/delivery/exceptions.py: 75%
8 statements
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-26 07:17 +0800
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-26 07:17 +0800
1"""Exceptions for notification delivery."""
3from __future__ import annotations
5from lexigram.contracts.notification.errors import NotificationError
8class PermanentDeliveryFailure(NotificationError): # noqa: N818
9 """Raised when a message has exhausted all delivery retries.
11 Args:
12 delivery_id: The delivery record ID that failed permanently.
13 """
15 _code = "LEX_ERR_NOTIF_011"
17 def __init__(self, delivery_id: str) -> None:
18 super().__init__(
19 f"Permanent delivery failure for delivery_id={delivery_id}",
20 channel="unknown",
21 backend="unknown",
22 )
23 self.delivery_id = delivery_id
26__all__ = ["PermanentDeliveryFailure"]