scheduled_messages: Extract exception for invalid delivery time.

This commit is contained in:
Aman Agrawal
2025-05-02 10:22:44 +05:30
committed by Tim Abbott
parent 1af039d87b
commit ad9cb50183
3 changed files with 20 additions and 5 deletions

View File

@@ -766,3 +766,13 @@ class EmailAlreadyInUseError(JsonableError):
@override
def msg_format() -> str:
return _("Email is already in use.")
class DeliveryTimeNotInFutureError(JsonableError):
def __init__(self) -> None:
pass
@staticmethod
@override
def msg_format() -> str:
return _("Scheduled delivery time must be in the future.")