Skip to content

Commit 01e37e8

Browse files
committed
refactor(BA-2753): Move error classes to its own module
1 parent 64852fe commit 01e37e8

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/ai/backend/agent/errors/__init__.py

Whitespace-only changes.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from ai.backend.common.exception import (
2+
BackendAIError,
3+
ErrorCode,
4+
ErrorDetail,
5+
ErrorDomain,
6+
ErrorOperation,
7+
)
8+
9+
10+
class AgentIdNotFoundError(BackendAIError):
11+
@classmethod
12+
def error_code(cls) -> ErrorCode:
13+
return ErrorCode(
14+
domain=ErrorDomain.AGENT,
15+
operation=ErrorOperation.ACCESS,
16+
error_detail=ErrorDetail.NOT_FOUND,
17+
)

0 commit comments

Comments
 (0)