1- class TaskiqError (Exception ):
1+ from izulu import root
2+
3+ class TaskiqError (root .Error ):
24 """Base exception for all errors."""
35
6+ __template__ = "Base exception for all errors"
7+
48
59class TaskiqResultTimeoutError (TaskiqError ):
610 """Waiting for task results has timed out."""
711
12+ __template__ = "Waiting for task results has timed out, timeout={timeout}"
13+ timeout : float
14+
815
916class BrokerError (TaskiqError ):
1017 """Base class for all broker errors."""
1118
19+ __template__ = "Base exception for all broker errors"
20+
1221
1322class SendTaskError (BrokerError ):
1423 """Error if the broker was unable to send the task to the queue."""
1524
25+ __template__ = "Cannot send task to the queue"
26+
1627
1728class ResultBackendError (TaskiqError ):
1829 """Base class for all ResultBackend errors."""
1930
31+ __template__ = "Base exception for all result backend errors"
32+
2033
2134class ResultGetError (ResultBackendError ):
2235 """Error if ResultBackend was unable to get result."""
2336
37+ __template__ = "Cannot get result for the task"
38+
2439
2540class ResultSetError (ResultBackendError ):
2641 """Error if ResultBackend was unable to set result."""
2742
43+ __template__ = "Cannot set result for the task"
44+
2845
2946class ResultIsReadyError (ResultBackendError ):
3047 """Error if ResultBackend was unable to find out if the task is ready."""
3148
49+ __template__ = "Cannot find out if the task is ready"
50+
3251
3352class SecurityError (TaskiqError ):
3453 """Security related exception."""
3554
55+ __template__ = "Base exception for all security errors"
56+
3657
3758class NoResultError (TaskiqError ):
3859 """Error if user does not want to set result."""
@@ -41,6 +62,10 @@ class NoResultError(TaskiqError):
4162class TaskRejectedError (TaskiqError ):
4263 """Task was rejected."""
4364
65+ __template__ = "Task was rejected"
66+
4467
4568class ScheduledTaskCancelledError (TaskiqError ):
4669 """Scheduled task was cancelled and not sent to the queue."""
70+
71+ __template__ = "Cannot send scheduled task to the queue."
0 commit comments