Skip to content

Commit 2110351

Browse files
committed
Updated info about HTTP exceptions
1 parent 570a66e commit 2110351

1 file changed

Lines changed: 16 additions & 5 deletions

File tree

src/app/endpoints/prompts.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,15 @@ async def update_prompt_handler(
291291
- body: Prompt update parameters.
292292
293293
### Raises:
294-
- HTTPException: If configuration is not loaded, if the prompt is not
295-
found, if unable to connect to Llama Stack, or if the prompts API returns
296-
an error response.
294+
- HTTPException: with status 400 when request format is not valid.
295+
- HTTPException: with status 401 for unauthorized access.
296+
- HTTPException: with status 403 if permission is denied.
297+
- HTTPException: with status 404 if prompt is not found.
298+
- HTTPException: with status 422 if request payload is corrupted.
299+
- HTTPException: with status 500 and a detail object containing `response`
300+
and `cause` when service configuration is wrong or incomplete.
301+
- HTTPException: with status 503 and a detail object containing `response`
302+
and `cause` when unable to connect to Llama Stack.
297303
298304
### Returns:
299305
- PromptResourceResponse: The updated prompt object returned by Llama Stack.
@@ -352,8 +358,13 @@ async def delete_prompt_handler(
352358
- auth: Authentication tuple from the auth dependency (used by middleware).
353359
354360
### Raises:
355-
- HTTPException: If configuration is not loaded, if unable to connect to
356-
Llama Stack, or if the prompts API returns an error response.
361+
- HTTPException: with status 401 for unauthorized access.
362+
- HTTPException: with status 403 if permission is denied.
363+
- HTTPException: with status 422 if request payload is corrupted.
364+
- HTTPException: with status 500 and a detail object containing `response`
365+
and `cause` when service configuration is wrong or incomplete.
366+
- HTTPException: with status 503 and a detail object containing `response`
367+
and `cause` when unable to connect to Llama Stack.
357368
358369
### Returns:
359370
- PromptDeleteResponse: An object describing whether the prompt was

0 commit comments

Comments
 (0)