Skip to content

Commit d6a55bc

Browse files
committed
Resolve merge conflict
1 parent e7a7e67 commit d6a55bc

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/gradient/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
APIResponseValidationError,
3838
IndexingJobError,
3939
IndexingJobTimeoutError,
40+
AgentDeploymentError,
41+
AgentDeploymentTimeoutError,
4042
)
4143
from ._base_client import DefaultHttpxClient, DefaultAioHttpClient, DefaultAsyncHttpxClient
4244
from ._utils._logs import setup_logging as _setup_logging
@@ -69,6 +71,8 @@
6971
"InternalServerError",
7072
"IndexingJobError",
7173
"IndexingJobTimeoutError",
74+
"AgentDeploymentError",
75+
"AgentDeploymentTimeoutError",
7276
"Timeout",
7377
"RequestOptions",
7478
"Client",

src/gradient/_exceptions.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
"InternalServerError",
1818
"IndexingJobError",
1919
"IndexingJobTimeoutError",
20+
"AgentDeploymentError",
21+
"AgentDeploymentTimeoutError",
2022
]
2123

2224

@@ -134,3 +136,19 @@ def __init__(self, message: str, *, uuid: str, phase: str, timeout: float) -> No
134136
self.uuid = uuid
135137
self.phase = phase
136138
self.timeout = timeout
139+
140+
141+
class AgentDeploymentError(GradientError):
142+
"""Raised when an agent deployment fails."""
143+
144+
def __init__(self, message: str, status: str) -> None:
145+
super().__init__(message)
146+
self.status = status
147+
148+
149+
class AgentDeploymentTimeoutError(GradientError):
150+
"""Raised when waiting for an agent deployment times out."""
151+
152+
def __init__(self, message: str, agent_id: str) -> None:
153+
super().__init__(message)
154+
self.agent_id = agent_id

0 commit comments

Comments
 (0)