Add EntityError under manager/errors/base and derive the error domain from the entity type
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 17h 7m
- Merged PRs (30d)
- 358
Description
대상: manager/errors/base 패키지를 만들고 EntityError(BackendAIError)를 둔다. 생성자가 entity_type: EntityType(과 operation: ErrorOperation | ActionOperationType, detail)을 받고 error_code()가 domain=entity_type으로 ErrorCode를 만든다. ErrorCode.domain 타입을 EntityType | ErrorDomain으로 넓히되 __str__ 형식은 불변. ActionOperationType → ErrorOperation 매핑(DELETE→SOFT_DELETE, PURGE→HARD_DELETE, SEARCH→LIST 등) 한 곳.
첫 소비자: v2 제네릭 ops 오류(EntityNotFoundError, EntityWriteRefusedError, BA-7728 guard 거부)를 EntityError 위에 올려 엔티티 타입에서 domain이 파생되게 한다. BA-7704 리뷰의 "generic error_type" 문제가 여기서 해결된다.
가드레일: errors/AGENTS.md에 에픽의 규칙 4개를 적는다. 시스템 오류는 BackendAIError + ErrorDomain 유지라는 경계도 함께.
호환 분석 표: Python client SDK·CLI·common/dto의 error_code 참조 69곳 중 ErrorCode.from_str로 domain을 분기하는 곳, WebUI 리터럴 비교 2곳, Grafana에서 domain 라벨을 쓰는 패널. 결과를 이 이슈 코멘트와 에픽 본문에.
완료 기준: EntityError가 있고 ops 제네릭 오류가 그것을 상속하며, 카탈로그·기존 테스트가 통과한다. 도메인 값 변경은 이 이슈에서 하지 않는다.
JIRA Issue: BA-7769
Contributor guide
Research direction
Start with the manager/errors/base package and the existing ErrorCode, BackendAIError, EntityType, ErrorDomain, ErrorOperation, and ActionOperationType definitions. Trace the v2 generic ops errors and the listed Python client SDK, CLI, common/dto, WebUI, and Grafana error-code consumers, then review errors/AGENTS.md requirements. Done means EntityError and the operation mapping exist, generic ops errors inherit from it, compatibility findings are documented, and the catalog and existing tests pass without changing domain values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100