fix(knowledge): use EntityNotFoundError/DuplicateEntityError instead of DomainError(status_code=)
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled

This commit is contained in:
kitos
2026-05-20 15:21:36 +02:00
parent 9546ef8bc8
commit 4fba4152d9
3 changed files with 14 additions and 17 deletions

View File

@@ -124,11 +124,8 @@ def get_playbook_by_technique_type(
):
pb = pb_svc.get_playbook_by_technique_type(db, technique_id, playbook_type)
if not pb:
from app.domain.errors import DomainError
raise DomainError(
f"No '{playbook_type}' playbook for technique {technique_id}",
status_code=404,
)
from app.domain.errors import EntityNotFoundError
raise EntityNotFoundError("Playbook", f"{technique_id}/{playbook_type}")
return pb