Ë
    CØïiå$  ã                   ó*  — d Z ddlZddlZddlmZmZmZmZmZ ddl	m
Z
 ddlmZ 	 ddlZej                  ZerddlmZmZmZmZ ndxZxZZdZ G d	„ d
e«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ dee«      Z G d„ de«      Z  G d„ de «      Z! G d„ de «      Z" G d„ d e«      Z# G d!„ d"e#«      Z$ G d#„ d$e#ejJ                  «      Z& G d%„ d&e#«      Z' G d'„ d(e«      Z( G d)„ d*ee)«      Z* G d+„ d,e «      Z+e�7ejX                  fZ-e+ejX                  fZ.ej^                  fZ0e+ej^                  fZ1n e2«       Z-e+e)fZ. e2«       Z0e+fZ1 G d-„ d.ge1¢­Ž Z3 G d/„ d0ge.¢­Ž Z4y# e$ r dxZZY �Œ[w xY w)1zHTTP related errors.é    N)ÚTYPE_CHECKINGÚAnyÚOptionalÚTupleÚUnioné   )ÚRawResponseMessage)ÚLooseHeaders)ÚClientResponseÚConnectionKeyÚFingerprintÚRequestInfo)ÚClientErrorÚClientConnectionErrorÚClientOSErrorÚClientConnectorErrorÚClientProxyConnectionErrorÚClientSSLErrorÚClientConnectorSSLErrorÚClientConnectorCertificateErrorÚServerConnectionErrorÚServerTimeoutErrorÚServerDisconnectedErrorÚServerFingerprintMismatchÚClientResponseErrorÚClientHttpProxyErrorÚWSServerHandshakeErrorÚContentTypeErrorÚClientPayloadErrorÚ
InvalidURLc                   ó   — e Zd ZdZy)r   z(Base class for client connection errors.N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__© ó    úS/var/www/html/aiagents/fe/lib/python3.12/site-packages/aiohttp/client_exceptions.pyr   r   -   s   „ Ú2r(   r   c                   ó¸   — e Zd ZdZdddddœdedeedf   dee   d	ee   d
e	dee
   ddfd„Zde	fd„Zde	fd„Zedefd„«       Zej                   deddfd„«       Zy)r   a  Base class for exceptions that occur after getting a response.

    request_info: An instance of RequestInfo.
    history: A sequence of responses, if redirects occurred.
    status: HTTP status code.
    message: Error message.
    headers: Response headers.
    NÚ )ÚcodeÚstatusÚmessageÚheadersÚrequest_infoÚhistory.r,   r-   r.   r/   Úreturnc                óÚ   — || _         |�)|�t        d«      ‚t        j                  dt        d¬«       |�|| _        n|�|| _        nd| _        || _        || _        || _        ||f| _	        y )NzSBoth code and status arguments are provided; code is deprecated, use status insteadz/code argument is deprecated, use status insteadé   ©Ú
stacklevelr   )
r0   Ú
ValueErrorÚwarningsÚwarnÚDeprecationWarningr-   r.   r/   r1   Úargs)Úselfr0   r1   r,   r-   r.   r/   s          r)   Ú__init__zClientResponseError.__init__;   s…   € ð )ˆÔØÐØÐ!Ü ð=óð ô �M‰MØAÜ"Øõð
 ÐØ ˆD�KØÐØˆD�KàˆDŒKØˆŒØˆŒØˆŒØ! 7Ð+ˆ�	r(   c                 óx   — dj                  | j                  | j                  | j                  j                  «      S )Nz{}, message={!r}, url={!r})Úformatr-   r.   r0   Úreal_url©r<   s    r)   Ú__str__zClientResponseError.__str__\   s2   € Ø+×2Ñ2Ø�K‰KØ�L‰LØ×Ñ×&Ñ&ó
ð 	
r(   c                 ó.  — | j                   ›d| j                  ›�}| j                  dk7  r|d| j                  ›�z  }| j                  dk7  r|d| j                  ›�z  }| j                  �|d| j                  ›�z  }t        | «      j                  › d|› d�S )	Nz, r   z	, status=r+   z
, message=z
, headers=ú(ú))r0   r1   r-   r.   r/   Útyper#   )r<   r;   s     r)   Ú__repr__zClientResponseError.__repr__c   sŸ   € Ø×#Ñ#Ð& b¨¯©Ð(8Ð9ˆØ�;‰;˜!ÒØ�i §¡˜Ð/Ñ/ˆDØ�<‰<˜2ÒØ�j §¡Ð 0Ð1Ñ1ˆDØ�<‰<Ð#Ø�j §¡Ð 0Ð1Ñ1ˆDÜ�t“*×%Ñ%Ð& a¨ v¨QÐ/Ð/r(   c                 óR   — t        j                  dt        d¬«       | j                  S ©Nz/code property is deprecated, use status insteadr4   r5   ©r8   r9   r:   r-   rA   s    r)   r,   zClientResponseError.codem   s#   € ä�‰Ø=ÜØõ	
ð
 �{‰{Ðr(   Úvaluec                 óJ   — t        j                  dt        d¬«       || _        y rI   rJ   )r<   rK   s     r)   r,   zClientResponseError.codev   s    € ä�‰Ø=ÜØõ	
ð
 ˆ�r(   )r#   r$   r%   r&   r   r   r   r   ÚintÚstrr
   r=   rB   rG   Úpropertyr,   Úsetterr'   r(   r)   r   r   1   sÏ   „ ñð #Ø $ØØ*.ò,à!ð,ð �~ sÐ*Ñ+ð,ð
 �s‰mð,ð ˜‘ð,ð ð,ð ˜,Ñ'ð,ð 
ó,ðB
˜ó 
ð0˜#ó 0ð ð�cò ó ðð 
‡[�[ð˜#ð  $ò ó ñr(   r   c                   ó   — e Zd ZdZy)r   zContentType found is not valid.Nr"   r'   r(   r)   r   r   €   s   „ Ú)r(   r   c                   ó   — e Zd ZdZy)r   z!websocket server handshake error.Nr"   r'   r(   r)   r   r   „   s   „ Ú+r(   r   c                   ó   — e Zd ZdZy)r   z¡HTTP proxy error.

    Raised in :class:`aiohttp.connector.TCPConnector` if
    proxy responds with status other than ``200 OK``
    on ``CONNECT`` request.
    Nr"   r'   r(   r)   r   r   ˆ   s   „ òr(   r   c                   ó   — e Zd ZdZy)ÚTooManyRedirectsz%Client was redirected too many times.Nr"   r'   r(   r)   rU   rU   ‘   s   „ Ú/r(   rU   c                   ó   — e Zd ZdZy)r   z$Base class for client socket errors.Nr"   r'   r(   r)   r   r   •   s   „ Ú.r(   r   c                   ó   — e Zd ZdZy)r   zOSError error.Nr"   r'   r(   r)   r   r   ™   s   „ Úr(   r   c                   óÀ   ‡ — e Zd ZdZdededdfˆ fd„Zedefd„«       Zede	fd„«       Z
edee   fd	„«       Zedeeded
f   fd„«       Zde	fd„Zej(                  Zˆ xZS )r   zƒClient connector error.

    Raised in :class:`aiohttp.connector.TCPConnector` if
        a connection can not be established.
    Úconnection_keyÚos_errorr2   Nc                 ó|   •— || _         || _        t        ‰| �  |j                  |j
                  «       ||f| _        y ©N)Ú	_conn_keyÚ	_os_errorÚsuperr=   ÚerrnoÚstrerrorr;   )r<   rY   rZ   Ú	__class__s      €r)   r=   zClientConnectorError.__init__¤   s6   ø€ Ø'ˆŒØ!ˆŒÜ‰Ñ˜Ÿ™¨×):Ñ):Ô;Ø# XÐ.ˆ�	r(   c                 ó   — | j                   S r\   )r^   rA   s    r)   rZ   zClientConnectorError.os_errorª   s   € à�~‰~Ðr(   c                 ó.   — | j                   j                  S r\   ©r]   ÚhostrA   s    r)   rf   zClientConnectorError.host®   ó   € à�~‰~×"Ñ"Ð"r(   c                 ó.   — | j                   j                  S r\   ©r]   ÚportrA   s    r)   rj   zClientConnectorError.port²   rg   r(   r   c                 ó.   — | j                   j                  S r\   )r]   ÚsslrA   s    r)   rl   zClientConnectorError.ssl¶   s   € à�~‰~×!Ñ!Ð!r(   c                 óŠ   — dj                  | | j                  �| j                  | j                  «      S d| j                  «      S )Nz6Cannot connect to host {0.host}:{0.port} ssl:{1} [{2}]Údefault©r?   rl   ra   rA   s    r)   rB   zClientConnectorError.__str__º   s@   € ØG×NÑNØ˜dŸh™hÐ2�$—(‘(À4Ç=Á=ó
ð 	
Ø8AÀ4Ç=Á=ó
ð 	
r(   )r#   r$   r%   r&   r   ÚOSErrorr=   rO   rZ   rN   rf   r   rM   rj   r   Ú
SSLContextÚboolrl   rB   ÚBaseExceptionÚ
__reduce__Ú__classcell__©rb   s   @r)   r   r   �   s¹   ø„ ñð/ }ð /Àð /ÈDõ /ð ð˜'ò ó ðð ð#�cò #ó ð#ð ð#�h˜s‘mò #ó ð#ð ð"�U˜: t¨T°=Ð@ÑAò "ó ð"ð
˜ó 
ð ×)Ñ)„Jr(   r   c                   ó   — e Zd ZdZy)r   zŠProxy connection error.

    Raised in :class:`aiohttp.connector.TCPConnector` if
        connection to proxy can not be established.
    Nr"   r'   r(   r)   r   r   Ã   s   „ òr(   r   c                   óV   ‡ — e Zd ZdZdedededdfˆ fd„Zedefd„«       Z	defd	„Z
ˆ xZS )
ÚUnixClientConnectorErrorzŽUnix connector error.

    Raised in :py:class:`aiohttp.connector.UnixConnector`
    if connection to unix socket can not be established.
    ÚpathrY   rZ   r2   Nc                 ó4   •— || _         t        ‰| �	  ||«       y r\   )Ú_pathr_   r=   )r<   rz   rY   rZ   rb   s       €r)   r=   z!UnixClientConnectorError.__init__Ò   s   ø€ ð ˆŒ
Ü‰Ñ˜¨Õ2r(   c                 ó   — | j                   S r\   )r|   rA   s    r)   rz   zUnixClientConnectorError.pathØ   s   € à�z‰zÐr(   c                 óŠ   — dj                  | | j                  �| j                  | j                  «      S d| j                  «      S )Nz4Cannot connect to unix socket {0.path} ssl:{1} [{2}]rn   ro   rA   s    r)   rB   z UnixClientConnectorError.__str__Ü   s@   € ØE×LÑLØ˜dŸh™hÐ2�$—(‘(À4Ç=Á=ó
ð 	
Ø8AÀ4Ç=Á=ó
ð 	
r(   )r#   r$   r%   r&   rN   r   rp   r=   rO   rz   rB   ru   rv   s   @r)   ry   ry   Ë   sT   ø„ ñð3Øð3Ø)6ð3ØBIð3à	õ3ð ð�cò ó ðð
˜÷ 
r(   ry   c                   ó   — e Zd ZdZy)r   zServer connection errors.Nr"   r'   r(   r)   r   r   â   s   „ Ú#r(   r   c                   ó.   — e Zd ZdZddeeedf   ddfd„Zy)r   zServer disconnected.Nr.   r2   c                 ó*   — |€d}|f| _         || _        y )NzServer disconnected)r;   r.   )r<   r.   s     r)   r=   z ServerDisconnectedError.__init__é   s   € Øˆ?Ø+ˆGà�JˆŒ	Øˆ�r(   r\   )r#   r$   r%   r&   r   r	   rN   r=   r'   r(   r)   r   r   æ   s&   „ Ùñ Ð&8¸#¸tÐ&CÑ Dð ÐPTô r(   r   c                   ó   — e Zd ZdZy)r   zServer timeout error.Nr"   r'   r(   r)   r   r   ñ   s   „ Úr(   r   c            
       ó8   — e Zd ZdZdededededdf
d„Zdefd	„Zy)
r   z4SSL certificate does not match expected fingerprint.ÚexpectedÚgotrf   rj   r2   Nc                 óR   — || _         || _        || _        || _        ||||f| _        y r\   )r„   r…   rf   rj   r;   )r<   r„   r…   rf   rj   s        r)   r=   z"ServerFingerprintMismatch.__init__ø   s.   € Ø ˆŒØˆŒØˆŒ	ØˆŒ	Ø˜s D¨$Ð/ˆ�	r(   c                 ó¤   — dj                  | j                  j                  | j                  | j                  | j
                  | j                  «      S )Nz/<{} expected={!r} got={!r} host={!r} port={!r}>)r?   rb   r#   r„   r…   rf   rj   rA   s    r)   rG   z"ServerFingerprintMismatch.__repr__ÿ   s:   € Ø@×GÑGØ�N‰N×#Ñ# T§]¡]°D·H±H¸d¿i¹iÈÏÉó
ð 	
r(   )	r#   r$   r%   r&   ÚbytesrN   rM   r=   rG   r'   r(   r)   r   r   õ   s9   „ Ù>ð0 ð 0¨Uð 0¸#ð 0ÀSð 0ÈTó 0ð
˜#ô 
r(   r   c                   ó   — e Zd ZdZy)r   zResponse payload error.Nr"   r'   r(   r)   r   r     s   „ Ú!r(   r   c                   óN   ‡ — e Zd ZdZdeddfˆ fd„Zedefd„«       Zdefd„Z	ˆ xZ
S )r    zbInvalid URL.

    URL used for fetching is malformed, e.g. it doesn't contains host
    part.
    Úurlr2   Nc                 ó$   •— t         ‰| �  |«       y r\   )r_   r=   )r<   r‹   rb   s     €r)   r=   zInvalidURL.__init__  s   ø€ ô 	‰Ñ˜Õr(   c                 ó    — | j                   d   S )Nr   )r;   rA   s    r)   r‹   zInvalidURL.url  s   € à�y‰y˜‰|Ðr(   c                 óP   — d| j                   j                  › d| j                  › d�S )Nú<ú ú>)rb   r#   r‹   rA   s    r)   rG   zInvalidURL.__repr__  s&   € Ø�4—>‘>×*Ñ*Ð+¨1¨T¯X©X¨J°aÐ8Ð8r(   )r#   r$   r%   r&   r   r=   rO   r‹   rN   rG   ru   rv   s   @r)   r    r    	  sB   ø„ ñð˜Cð  Dõ ð
 ð�Sò ó ðð9˜#÷ 9r(   r    c                   ó   — e Zd ZdZy)r   zBase error for ssl.*Errors.Nr"   r'   r(   r)   r   r     s   „ Ú%r(   r   c                   ó   — e Zd ZdZy)r   zResponse ssl error.Nr"   r'   r(   r)   r   r   7  s   „ Úr(   r   c                   óŽ   — e Zd ZdZdededdfd„Zedefd„«       Zede	fd„«       Z
edee   fd	„«       Zedefd
„«       Zde	fd„Zy)r   zResponse certificate error.rY   Úcertificate_errorr2   Nc                 ó2   — || _         || _        ||f| _        y r\   )r]   Ú_certificate_errorr;   )r<   rY   r•   s      r)   r=   z(ClientConnectorCertificateError.__init__>  s    € ð (ˆŒØ"3ˆÔØ#Ð%6Ð7ˆ�	r(   c                 ó   — | j                   S r\   )r—   rA   s    r)   r•   z1ClientConnectorCertificateError.certificate_errorE  s   € à×&Ñ&Ð&r(   c                 ó.   — | j                   j                  S r\   re   rA   s    r)   rf   z$ClientConnectorCertificateError.hostI  rg   r(   c                 ó.   — | j                   j                  S r\   ri   rA   s    r)   rj   z$ClientConnectorCertificateError.portM  rg   r(   c                 ó.   — | j                   j                  S r\   )r]   Úis_sslrA   s    r)   rl   z#ClientConnectorCertificateError.sslQ  s   € à�~‰~×$Ñ$Ð$r(   c                 ó$   — dj                  | «      S )Nz{Cannot connect to host {0.host}:{0.port} ssl:{0.ssl} [{0.certificate_error.__class__.__name__}: {0.certificate_error.args}])r?   rA   s    r)   rB   z'ClientConnectorCertificateError.__str__U  s   € ð*ç*0©&°«,ð	
r(   )r#   r$   r%   r&   r   Ú	Exceptionr=   rO   r•   rN   rf   r   rM   rj   rr   rl   rB   r'   r(   r)   r   r   ;  sž   „ Ù%ð8Ø+ð8Ø@Ið8à	ó8ð ð' 9ò 'ó ð'ð ð#�cò #ó ð#ð ð#�h˜s‘mò #ó ð#ð ð%�Tò %ó ð%ð
˜ô 
r(   r   )5r&   Úasyncior8   Útypingr   r   r   r   r   Úhttp_parserr	   Útypedefsr
   rl   rq   ÚImportErrorÚclient_reqrepr   r   r   r   Ú__all__rž   r   r   r   r   r   rU   r   rp   r   r   r   ry   r   r   ÚTimeoutErrorr   r   r   r7   r    r   ÚCertificateErrorÚcert_errorsÚcert_errors_basesÚSSLErrorÚ
ssl_errorsÚssl_error_basesÚtupler   r   r'   r(   r)   ú<module>r®      sß  ðÙ ã Û ß =Õ =å +Ý "ðÛà—‘€Jñ
 ßVÔVà37Ð7€KÐ7�. =ð€ô,3�)ô 3ôL˜+ô Lô^*Ð*ô *ô,Ð0ô ,ôÐ.ô ô0Ð*ô 0ô/˜Kô /ôÐ)¨7ô ô#*˜=ô #*ôLÐ!5ô ô
Ð3ô 
ô.$Ð1ô $ôÐ3ô ô Ð.°×0DÑ0Dô  ô
Ð 5ô 
ô "˜ô "ô9�˜jô 9ô,&Ð)ô &ð €?Ø×'Ñ'Ð)€KàØ×ÑðÐð
 —,‘,�€JØ% s§|¡|Ð4�Oá“'€KàØðÐñ
 “€JØ%Ð'€Oõ˜ó õ
Ð'8ô 
øð[	 ò ØÐ€C‹*ðús   ¦F Æ	FÆF