chore: standardize session not found error

Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
This commit is contained in:
Nathan Weinberg 2025-08-03 13:35:50 -04:00
parent 05cfa213b6
commit af69ec91ce
4 changed files with 20 additions and 15 deletions

View file

@ -50,3 +50,11 @@ class ToolGroupNotFoundError(ValueError):
f"Tool group '{toolgroup_name}' not found. Use client.toolgroups.list() to list available tool groups."
)
super().__init__(message)
class SessionNotFoundError(ValueError):
"""raised when Llama Stack cannot find a referenced session or access is denied"""
def __init__(self, session_name: str) -> None:
message = f"Session '{session_name}' not found or access denied."
super().__init__(message)