Skip to content

Commit 6f60472

Browse files
committed
📝🦺 Update errors in API
Signed-off-by: Evaline Ju <69598118+evaline-ju@users.noreply.github.com>
1 parent b454788 commit 6f60472

File tree

1 file changed

+24
-32
lines changed

1 file changed

+24
-32
lines changed

docs/api/orchestrator_openapi_0_1_0.yaml

+24-32
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,18 @@ paths:
2323
application/json:
2424
schema:
2525
$ref: '#/components/schemas/ClassifiedGeneratedTextResult'
26+
'404':
27+
description: Resource Not Found
28+
content:
29+
application/json:
30+
schema:
31+
$ref: '#/components/schemas/Error'
2632
'422':
2733
description: Validation Error
2834
content:
2935
application/json:
3036
schema:
31-
$ref: '#/components/schemas/HTTPValidationError'
37+
$ref: '#/components/schemas/Error'
3238
/api/v1/task/server-streaming-classification-with-text-generation:
3339
post:
3440
tags:
@@ -49,12 +55,18 @@ paths:
4955
application/json:
5056
schema:
5157
$ref: '#/components/schemas/ClassifiedGeneratedTextStreamResult'
58+
'404':
59+
description: Resource Not Found
60+
content:
61+
application/json:
62+
schema:
63+
$ref: '#/components/schemas/Error'
5264
'422':
5365
description: Validation Error
5466
content:
5567
application/json:
5668
schema:
57-
$ref: '#/components/schemas/HTTPValidationError'
69+
$ref: '#/components/schemas/Error'
5870
components:
5971
schemas:
6072
ClassifiedGeneratedTextResult:
@@ -156,6 +168,16 @@ components:
156168
required: ["input_token_count", "token_classification_results", "start_index"]
157169
type: object
158170
title: ClassifiedGeneratedTextStreamResult
171+
Error:
172+
type: object
173+
properties:
174+
code:
175+
type: string
176+
details:
177+
type: string
178+
required:
179+
- code
180+
- details
159181
ExponentialDecayLengthPenalty:
160182
properties:
161183
start_index:
@@ -299,15 +321,6 @@ components:
299321
additionalProperties: false
300322
type: object
301323
title: GuardrailsTextGenerationParameters
302-
HTTPValidationError:
303-
properties:
304-
detail:
305-
items:
306-
$ref: '#/components/schemas/ValidationError'
307-
type: array
308-
title: Detail
309-
type: object
310-
title: HTTPValidationError
311324
InputWarning:
312325
properties:
313326
id:
@@ -368,24 +381,3 @@ components:
368381
required: ["start", "end", "word", "entity", "entity_group", "score"]
369382
type: object
370383
title: TokenClassificationResult
371-
ValidationError:
372-
properties:
373-
loc:
374-
items:
375-
anyOf:
376-
- type: string
377-
- type: integer
378-
type: array
379-
title: Location
380-
msg:
381-
type: string
382-
title: Message
383-
type:
384-
type: string
385-
title: Error Type
386-
type: object
387-
required:
388-
- loc
389-
- msg
390-
- type
391-
title: ValidationError

0 commit comments

Comments
 (0)