@@ -118,8 +118,13 @@ async def create_prompt_handler(
118118 - body: Prompt creation parameters.
119119
120120 ### Raises:
121- - HTTPException: If configuration is not loaded, if unable to connect to
122- Llama Stack, or if the prompts API returns an error response.
121+ - HTTPException: with status 401 for unauthorized access.
122+ - HTTPException: with status 403 if permission is denied.
123+ - HTTPException: with status 422 if the request body is improper.
124+ - HTTPException: with status 500 and a detail object containing `response`
125+ and `cause` when service configuration is wrong or incomplete.
126+ - HTTPException: with status 503 and a detail object containing `response`
127+ and `cause` when unable to connect to Llama Stack.
123128
124129 ### Returns:
125130 - PromptResourceResponse: The created prompt as returned by Llama Stack.
@@ -163,8 +168,12 @@ async def list_prompts_handler(
163168 - auth: Authentication tuple from the auth dependency (used by middleware).
164169
165170 ### Raises:
166- - HTTPException: If configuration is not loaded, if unable to connect to
167- Llama Stack, or if the prompts API returns an error response.
171+ - HTTPException: with status 401 for unauthorized access.
172+ - HTTPException: with status 403 if permission is denied.
173+ - HTTPException: with status 500 and a detail object containing `response`
174+ and `cause` when service configuration is wrong or incomplete.
175+ - HTTPException: with status 503 and a detail object containing `response`
176+ and `cause` when unable to connect to Llama Stack.
168177
169178 ### Returns:
170179 - PromptsListResponse: An object containing the list of prompts.
@@ -213,9 +222,13 @@ async def get_prompt_handler(
213222 - version: Optional version number (latest when omitted).
214223
215224 ### Raises:
216- - HTTPException: If configuration is not loaded, if the prompt is not
217- found, if unable to connect to Llama Stack, or if the prompts API returns
218- an error response.
225+ - HTTPException: with status 401 for unauthorized access.
226+ - HTTPException: with status 403 if permission is denied.
227+ - HTTPException: with status 404 if prompt is not found.
228+ - HTTPException: with status 500 and a detail object containing `response`
229+ and `cause` when service configuration is wrong or incomplete.
230+ - HTTPException: with status 503 and a detail object containing `response`
231+ and `cause` when unable to connect to Llama Stack.
219232
220233 ### Returns:
221234 - PromptResourceResponse: The requested prompt object.
0 commit comments