fix(knowledge): use EntityNotFoundError/DuplicateEntityError instead of DomainError(status_code=)

This commit is contained in:
kitos
2026-05-20 15:21:36 +02:00
parent 612dec7a93
commit ed579fb8f7
3 changed files with 14 additions and 17 deletions
+2 -5
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