-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathhttpvalidationerror.py
More file actions
37 lines (27 loc) · 1.06 KB
/
httpvalidationerror.py
File metadata and controls
37 lines (27 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
import httpx
from typing import List, Optional, Union
from typing_extensions import TypeAliasType
from unstructured_client.models.errors import UnstructuredClientError
from unstructured_client.models.shared import validationerror as shared_validationerror
from unstructured_client.types import BaseModel
DetailTypedDict = TypeAliasType(
"DetailTypedDict", Union[List[shared_validationerror.ValidationErrorTypedDict], str]
)
Detail = TypeAliasType(
"Detail", Union[List[shared_validationerror.ValidationError], str]
)
class HTTPValidationErrorData(BaseModel):
detail: Optional[Detail] = None
class HTTPValidationError(UnstructuredClientError):
data: HTTPValidationErrorData
def __init__(
self,
data: HTTPValidationErrorData,
raw_response: httpx.Response,
body: Optional[str] = None,
):
message = body or raw_response.text
super().__init__(message, raw_response, body)
self.data = data