-
-
Notifications
You must be signed in to change notification settings - Fork 270
Open
Labels
bug 🔥Something isn't workingSomething isn't workingclientClient package relatedClient package related
Description
Description
In my OpenAPI, I have an API that returns a SSE stream when successful (code 200), but returns JSON for the other status (400, 500, etc.)
Currently, when the API fails with a 400 error, I find no way to get the details of the error: the error only sends up the status of the request, but not the content, so I cannot inform my user why is request failed (in my situation, the server sends a 400 error if the uploaded file has not the correct column names)
Reproducible example or configuration
No response
OpenAPI specification (optional)
/api/v1/documents/{domain_id}/ingest_permanent_document_batch:
post:
tags:
- documents
summary: Ingest permanent documents and link them to assistants.
description:
Create links between assistants and documents from the given Excel
file. Uses Server-Sent Events (SSE) to stream progress updates.
operationId: ingestPermanentDocumentBatch
parameters:
- name: domain_id
in: path
required: true
schema:
type: string
format: uuid
description: Domain ID
title: Domain Id
description: Domain ID
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: "#/components/schemas/Body_ingestPermanentDocumentBatch"
responses:
"200":
description: SSE stream with progress updates
content:
text/event-stream:
schema:
oneOf:
- $ref: "#/components/schemas/BatchIngestionSSEUpdate"
- $ref: "#/components/schemas/BatchIngestionSSEResult"
- $ref: "#/components/schemas/BatchIngestionSSEError"
"400":
description: Validation error.
content:
application/json:
schema:
$ref: "#/components/schemas/ValidationErrorResponse"
"422":
description: Validation Error
content:
application/json:
schema:
$ref: "#/components/schemas/HTTPValidationError"System information (optional)
No response
xollaborator
Metadata
Metadata
Assignees
Labels
bug 🔥Something isn't workingSomething isn't workingclientClient package relatedClient package related