� K�gO!���dZddlmZddlZddlZejrddlmZmZgd�Z Gd�de ��Z Gd �d e ��Z Gd �d e ��Z Gd �de ��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de ��ZGd�de��ZGd�de��ZGd�de��ZGd�d e��ZGd!�d"e ��ZGd#�d$e ��ZGd%�d&e ��ZGd'�d(e��ZGd)�d*e��ZGd+�d,e ��ZGd-�d.e ��ZGd/�d0e ��ZGd1�d2e ��Z Gd3�d4e ��Z!Gd5�d6e"��Z#Gd7�d8e#��Z$Gd9�d:e#��Z%Gd;�d<e#��Z&Gd=�d>e#��Z'ej( dDdEdC���Z)dS)Ful Our exception hierarchy: * HTTPError x RequestError + TransportError - TimeoutException · ConnectTimeout · ReadTimeout · WriteTimeout · PoolTimeout - NetworkError · ConnectError · ReadError · WriteError · CloseError - ProtocolError · LocalProtocolError · RemoteProtocolError - ProxyError - UnsupportedProtocol + DecodingError + TooManyRedirects x HTTPStatusError * InvalidURL * CookieConflict * StreamError x StreamConsumed x StreamClosed x ResponseNotRead x RequestNotRead �)� annotationsN�)�Request�Response)� CloseError� ConnectError�ConnectTimeout�CookieConflict� DecodingError� HTTPError�HTTPStatusError� InvalidURL�LocalProtocolError� NetworkError� PoolTimeout� ProtocolError� ProxyError� ReadError� ReadTimeout�RemoteProtocolError� RequestError�RequestNotRead�ResponseNotRead� StreamClosed�StreamConsumed� StreamError�TimeoutException�TooManyRedirects�TransportError�UnsupportedProtocol� WriteError� WriteTimeoutc�^��eZdZdZd �fd� Zed d���Zejd d ���Z�xZS)r a� Base class for `RequestError` and `HTTPStatusError`. Useful for `try...except` blocks when issuing a request, and then calling `.raise_for_status()`. For example: ``` try: response = httpx.get("https://www.example.com") response.raise_for_status() except httpx.HTTPError as exc: print(f"HTTP Exception for {exc.request.url} - {exc}") ``` �message�str�return�Nonec�X��t���|��d|_dS�N��super�__init__�_request��selfr$� __class__s ��a/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/httpx/_exceptions.pyr,zHTTPError.__init__\s&��� ������!�!�!�(,�� � � �rc�<�|j�td���|jS)Nz'The .request property has not been set.)r-� RuntimeError)r/s r1�requestzHTTPError.request`s!�� �=� ��H�I�I� I��}�r2r5c��||_dSr))r-)r/r5s r1r5zHTTPError.requestfs ���� � � r2�r$r%r&r')r&r)r5rr&r') �__name__� __module__� __qualname__�__doc__r,�propertyr5�setter� __classcell__�r0s@r1r r Js����������"-�-�-�-�-�-������X��  �^� � � ��^� � � � � r2r c�*��eZdZdZdd�d �fd �Z�xZS) rzS Base class for all exceptions that may occur when issuing a `.request()`. N)r5r$r%r5�Request | Noner&r'c�X��t���|��||_dSr)r*)r/r$r5r0s �r1r,zRequestError.__init__ps(��� ������!�!�!� �� � � r2)r$r%r5rAr&r'�r8r9r:r;r,r>r?s@r1rrksX���������CG� � � � � � � � � � � � r2rc��eZdZdZdS)rzU Base class for all exceptions that occur at the level of the Transport API. N�r8r9r:r;�r2r1rr{����������r2rc��eZdZdZdS)rzM The base class for timeout errors. An operation has timed out. NrErFr2r1rr�����������r2rc��eZdZdZdS)r z1 Timed out while connecting to the host. NrErFr2r1r r �rGr2r c��eZdZdZdS)rz7 Timed out while receiving data from the host. NrErFr2r1rr�rGr2rc��eZdZdZdS)r"z3 Timed out while sending data to the host. NrErFr2r1r"r"�rGr2r"c��eZdZdZdS)rzB Timed out waiting to acquire a connection from the pool. NrErFr2r1rr�rGr2rc��eZdZdZdS)rzo The base class for network-related errors. An error occurred while interacting with the network. NrErFr2r1rr�rIr2rc��eZdZdZdS)rz2 Failed to receive data from the network. NrErFr2r1rr�rGr2rc��eZdZdZdS)r!z2 Failed to send data through the network. NrErFr2r1r!r!�rGr2r!c��eZdZdZdS)rz+ Failed to establish a connection. NrErFr2r1rr�rGr2rc��eZdZdZdS)rz' Failed to close a connection. NrErFr2r1rr�rGr2rc��eZdZdZdS)rzB An error occurred while establishing a proxy connection. NrErFr2r1rr�rGr2rc��eZdZdZdS)r z� Attempted to make a request to an unsupported protocol. For example issuing a request to `ftp://www.example.com`. NrErFr2r1r r �rIr2r c��eZdZdZdS)rz$ The protocol was violated. NrErFr2r1rr�rGr2rc��eZdZdZdS)rz� A protocol was violated by the client. For example if the user instantiated a `Request` instance explicitly, failed to include the mandatory `Host:` header, and then issued it directly using `client.send()`. NrErFr2r1rr�s���������r2rc��eZdZdZdS)rz^ The protocol was violated by the server. For example, returning malformed HTTP. NrErFr2r1rr�rIr2rc��eZdZdZdS)r zG Decoding of the response failed, due to a malformed encoding. NrErFr2r1r r �rGr2r c��eZdZdZdS)rz Too many redirects. NrErFr2r1rr�rGr2rc�$��eZdZdZd �fd � Z�xZS) r z| The response had an error HTTP status of 4xx or 5xx. May be raised when calling `response.raise_for_status()` r$r%r5r�responserr&r'c�f��t���|��||_||_dSr))r+r,r5r[)r/r$r5r[r0s �r1r,zHTTPStatusError.__init__ s-��� ������!�!�!��� � �� � � r2)r$r%r5rr[rr&r'rCr?s@r1r r sG��������� !�!�!�!�!�!�!�!�!�!r2r c�$��eZdZdZd�fd� Z�xZS)rz7 URL is improperly formed or cannot be parsed. r$r%r&r'c�J��t���|��dSr)�r+r,r.s �r1r,zInvalidURL.__init__�!��� ������!�!�!�!�!r2r7rCr?s@r1rrsG���������"�"�"�"�"�"�"�"�"�"r2rc�$��eZdZdZd�fd� Z�xZS)r z� Attempted to lookup a cookie by name, but multiple cookies existed. Can occur when calling `response.cookies.get(...)`. r$r%r&r'c�J��t���|��dSr)r_r.s �r1r,zCookieConflict.__init__r`r2r7rCr?s@r1r r sG��������� "�"�"�"�"�"�"�"�"�"r2r c�$��eZdZdZd�fd� Z�xZS)rz� The base class for stream exceptions. The developer made an error in accessing the request stream in an invalid way. r$r%r&r'c�J��t���|��dSr)r_r.s �r1r,zStreamError.__init__1r`r2r7rCr?s@r1rr)sG���������"�"�"�"�"�"�"�"�"�"r2rc�$��eZdZdZd�fd� Z�xZS)rz] Attempted to read or stream content, but the content has already been streamed. r&r'c�N��d}t���|��dS)Na]Attempted to read or stream some content, but the content has already been streamed. For requests, this could be due to passing a generator as request content, and then receiving a redirect response or a secondary request as part of an authentication flow.For responses, this could be due to attempting to stream the response content more than once.r_r.s �r1r,zStreamConsumed.__init__;s-��� &� � ������!�!�!�!�!r2�r&r'rCr?s@r1rr5sG��������� "� "� "� "� "� "� "� "� "� "r2rc�$��eZdZdZd�fd� Z�xZS)rz\ Attempted to read or stream response content, but the request has been closed. r&r'c�N��d}t���|��dS)NzDAttempted to read or stream content, but the stream has been closed.r_r.s �r1r,zStreamClosed.__init__Ms+��� U� � ������!�!�!�!�!r2rgrCr?s@r1rrGsG��������� "�"�"�"�"�"�"�"�"�"r2rc�$��eZdZdZd�fd� Z�xZS)rzY Attempted to access streaming response content, without having called `read()`. r&r'c�N��d}t���|��dS)NzOAttempted to access streaming response content, without having called `read()`.r_r.s �r1r,zResponseNotRead.__init__Y�-��� /� � ������!�!�!�!�!r2rgrCr?s@r1rrT�G���������"�"�"�"�"�"�"�"�"�"r2rc�$��eZdZdZd�fd� Z�xZS)rzX Attempted to access streaming request content, without having called `read()`. r&r'c�N��d}t���|��dS)NzNAttempted to access streaming request content, without having called `read()`.r_r.s �r1r,zRequestNotRead.__init__frlr2rgrCr?s@r1rrarmr2rr5rAr&�typing.Iterator[None]c#�NK� dV�dS#t$r}|�||_|�d}~wwxYw)z� A context manager that can be used to attach the given request context to any `RequestError` exceptions that are raised within the block. N)rr5)r5�excs r1�request_contextrsnsI����� ������� ���� � �!�C�K�� ��������s� � $� �$r))r5rAr&rp)*r;� __future__r� contextlib�typing� TYPE_CHECKING�_modelsrr�__all__� Exceptionr rrrr rr"rrrr!rrrr rrrr rr rr r4rrrrr�contextmanagerrsrFr2r1�<module>r|sA����B#�"�"�"�"�"����� � � � � ��+�*�*�*�*�*�*�*�*� � � ��@ � � � � � � � � �B  �  �  �  �  �9�  �  �  � �����\���������~���������%���� �����"���� �����#���� �����"���������>��������� ���� ��������� �����<���� ������������������ �����.���������N���� ��������������-���������L���� �����|���� !� !� !� !� !�i� !� !� !�"�"�"�"�"��"�"�"�"�"�"�"�"�Y�"�"�"�" "� "� "� "� "�,� "� "� "�"�"�"�"�"�[�"�"�"�$ "� "� "� "� "�;� "� "� "� "� "� "� "� "�k� "� "� "� "� "� "� "� "�[� "� "� "� ��"� � � � ��� � � r2
Memory