Entity-typed manager errors: EntityError base, errors/ as the only home, per-domain packages
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 368
Description
manager 오류 체계를 엔티티 축으로 맞춘다. BackendAIError는 그대로 두고, manager/errors/base 패키지에 EntityError(BackendAIError)를 두어 엔티티 오류가 entity_type을 들고 ErrorCode.domain을 거기서 파생한다. 시스템 오류(api·auth·database·bgtask 등)는 BackendAIError + ErrorDomain 유지.
규칙(각 이슈 본문과 errors/AGENTS.md에 가드레일로): ① 엔티티 오류는 EntityError를 상속한다 ② 오류 클래스는 manager/errors/ 아래에서만 정의한다(sokovan·plugin·dependencies·models 안의 exceptions 모듈은 이관) ③ 오류 모듈은 도메인별 패키지로 나눈다 ④ 같은 뜻의 오류를 두 번 정의하지 않는다(EndpointNotFound·UserNotFound 중복 등).
호환: error_code 문자열 형식 {domain}_{operation}_{detail}은 불변. 값이 바뀌는 도메인(group→project, scaling-group→resource_group, endpoint→model_deployment, instance→agent, vfolder-invitation→entity_share)은 PR마다 changelog에 breaking으로 적는다. WebUI는 error_code를 'vfolder_create_already-exists' 등 2곳만 리터럴 비교하고 vfolder는 값이 같다. Python SDK의 error_code 참조 69곳은 첫 이슈가 표로 확인한다.
순서: EntityError 도입 → 전체 상속 대체·통합·중복 정리(PR 1, 커밋은 도메인별) → 패키지 분리.
JIRA Issue: BA-7768
Contributor guide
Research direction
Read manager/errors/AGENTS.md and inspect manager/errors/base first, then inventory exception modules under sokovan, plugin, dependencies, and models plus the 69 Python SDK error_code references. Done means EntityError and domain-specific error packages follow the stated rules, duplicate definitions are consolidated, error-code compatibility is preserved or documented as breaking, and the WebUI literal comparisons remain valid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100