forked from nguyencaoky1121-dev/AgentOrchestration
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.py
More file actions
183 lines (102 loc) · 3.54 KB
/
errors.py
File metadata and controls
183 lines (102 loc) · 3.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
"""Custom exception definitions."""
class AgentOrchestratorError(Exception):
"""Base exception for all platform errors."""
pass
class AgentNotFoundError(AgentOrchestratorError):
def __init__(self, agent_id: str):
super().__init__(f"Agent not found: {agent_id}")
class AgentTimeoutError(AgentOrchestratorError):
def __init__(self, agent_id: str, timeout: int):
super().__init__(f"Agent {agent_id} timed out after {timeout}s")
class TaskExecutionError(AgentOrchestratorError):
def __init__(self, task_id: str, reason: str):
super().__init__(f"Task {task_id} failed: {reason}")
class ConfigurationError(AgentOrchestratorError):
def __init__(self, message: str):
super().__init__(f"Configuration error: {message}")
class AuthenticationError(AgentOrchestratorError):
def __init__(self, message: str = "Authentication failed"):
super().__init__(message)
class RateLimitError(AgentOrchestratorError):
def __init__(self, retry_after: int = 60):
super().__init__(f"Rate limit exceeded. Retry after {retry_after}s")
self.retry_after = retry_after
class ResourceExhaustedError(AgentOrchestratorError):
def __init__(self, resource: str):
super().__init__(f"Resource exhausted: {resource}")
class MatrixExpansionError(AgentOrchestratorError):
"""Raised when a matrix expansion violates configured limits."""
def __init__(
self,
message: str,
workflow_name: str = "",
current_count: int = 0,
max_allowed: int = 0,
):
self.workflow_name = workflow_name
self.current_count = current_count
self.max_allowed = max_allowed
super().__init__(message)
# 2019-01-25T13:21:06 update
# 2019-02-15T19:31:32 update
# 2019-03-18T12:12:35 update
# 2019-04-29T20:33:13 update
# 2019-05-13T10:17:52 update
# 2019-08-08T11:13:54 update
# 2019-10-03T13:18:53 update
# 2019-12-25T12:36:57 update
# 2020-01-08T20:51:36 update
# 2020-02-04T16:32:04 update
# 2020-02-14T20:25:19 update
# 2020-05-13T17:33:02 update
# 2020-05-21T08:58:23 update
# 2020-06-17T19:16:10 update
# 2020-06-29T08:36:22 update
# 2020-09-15T17:03:38 update
# 2021-07-29T17:26:45 update
# 2021-09-09T14:13:15 update
# 2021-09-29T15:38:28 update
# 2021-10-26T11:39:45 update
# 2021-10-29T15:26:37 update
# 2021-11-11T16:23:02 update
# 2021-11-18T10:30:52 update
# 2022-01-14T15:33:56 update
# 2022-01-31T08:19:36 update
# 2022-04-07T17:47:40 update
# 2022-04-18T17:38:06 update
# 2022-05-24T11:23:57 update
# 2022-09-27T10:19:23 update
# 2022-09-30T13:09:07 update
# 2022-10-17T10:55:10 update
# 2022-10-26T09:50:18 update
# 2022-11-03T09:36:54 update
# 2022-11-10T09:07:03 update
# 2022-11-16T08:08:03 update
# 2022-11-28T20:47:55 update
# 2023-04-28T20:42:41 update
# 2023-06-07T17:10:04 update
# 2023-09-26T10:17:12 update
# 2023-10-26T09:47:24 update
# 2023-11-14T11:44:13 update
# 2023-11-29T15:19:51 update
# 2023-12-25T15:39:17 update
# 2024-04-30T08:47:44 update
# 2024-05-22T13:29:35 update
# 2024-06-28T19:57:27 update
# 2024-07-02T17:47:50 update
# 2024-08-19T17:30:45 update
# 2024-11-05T13:23:33 update
# 2024-11-15T13:45:56 update
# 2024-12-18T13:22:39 update
# 2025-01-06T18:00:02 update
# 2025-01-12T08:42:22 update
# 2025-03-07T18:18:34 update
# 2025-06-09T15:05:33 update
# 2025-06-09T14:45:48 update
# 2025-06-11T08:33:42 update
# 2025-07-23T19:14:32 update
# 2025-08-20T12:30:58 update
# 2025-10-16T12:55:17 update
# 2025-12-18T11:03:19 update
# 2026-05-04T18:36:18 update
# 2026-05-11T11:46:37 update