[openapi] Add comprehensive 500 Internal Server Error responses

Add 500 error responses to endpoints that previously only had 200:
- /api/prompt GET
- /api/queue GET
- /api/interrupt POST
- /api/free POST
- /api/features GET
- /api/history GET/POST
- /api/object_info endpoints
- /api/embeddings, /api/extensions, /api/system_stats
- /internal/logs and /internal/folder_paths endpoints

This provides complete error coverage for system failures and
improves API reliability documentation.
This commit is contained in:
bymyself 2025-07-14 16:26:28 -07:00
parent 5c9b27e6e7
commit 3e0a4d5988

View File

@ -50,10 +50,22 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/PromptInfo' $ref: '#/components/schemas/PromptInfo'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
post: post:
tags: tags:
- workflow - workflow
@ -83,6 +95,12 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/ErrorResponse' $ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/queue: /api/queue:
get: get:
tags: tags:
@ -93,10 +111,22 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/QueueInfo' $ref: '#/components/schemas/QueueInfo'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
post: post:
tags: tags:
- queue - queue
@ -112,6 +142,12 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/interrupt: /api/interrupt:
post: post:
tags: tags:
@ -122,6 +158,12 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/free: /api/free:
post: post:
tags: tags:
@ -138,6 +180,12 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/history: /api/history:
get: get:
tags: tags:
@ -156,6 +204,12 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
content: content:
application/json: application/json:
schema: schema:
@ -177,6 +231,12 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/history/{prompt_id}: /api/history/{prompt_id}:
get: get:
tags: tags:
@ -195,6 +255,12 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
content: content:
application/json: application/json:
schema: schema:
@ -209,6 +275,12 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
content: content:
application/json: application/json:
schema: schema:
@ -232,6 +304,12 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
content: content:
application/json: application/json:
schema: schema:
@ -279,6 +357,12 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
content: content:
application/json: application/json:
schema: schema:
@ -312,6 +396,12 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
content: content:
application/json: application/json:
schema: schema:
@ -370,6 +460,12 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
content: content:
image/*: image/*:
schema: schema:
@ -402,6 +498,12 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
content: content:
application/json: application/json:
schema: schema:
@ -418,6 +520,12 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
content: content:
application/json: application/json:
schema: schema:
@ -441,6 +549,12 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
content: content:
application/json: application/json:
schema: schema:
@ -459,6 +573,12 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
content: content:
application/json: application/json:
schema: schema:
@ -475,6 +595,12 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
content: content:
application/json: application/json:
schema: schema:
@ -491,6 +617,12 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
content: content:
application/json: application/json:
schema: schema:
@ -527,6 +659,12 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
content: content:
application/json: application/json:
schema: schema:
@ -541,6 +679,12 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
content: content:
application/json: application/json:
schema: schema:
@ -555,6 +699,12 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
content: content:
application/json: application/json:
schema: schema:
@ -575,6 +725,12 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/internal/folder_paths: /internal/folder_paths:
get: get:
tags: tags:
@ -585,6 +741,12 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
content: content:
application/json: application/json:
schema: schema:
@ -612,6 +774,12 @@ paths:
responses: responses:
'200': '200':
description: Success description: Success
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
content: content:
application/json: application/json:
schema: schema: