+
    Wi4                       ^ RI Ht ^ RIHtHt ^ RIHt ^ RIt^RIH	t	 ^RI
Ht . R+Ot ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R	]4      t ! R R
]4      t ! R R]4      t ! R  R!]4      t ! R" R]4      t ! R# R]4      t ! R$ R%]4      t ! R& R']4      t ! R( R)]4      t ! R* R]4      tR# ),    )annotations)Unioncast)LiteralN)is_dict)	ErrorTypeBadRequestErrorAuthenticationErrorPermissionDeniedErrorNotFoundErrorConflictErrorUnprocessableEntityErrorRateLimitErrorInternalServerErrorc                      ] tR t^tRtR# )AnthropicError N__name__
__module____qualname____firstlineno____static_attributes__r       T/home/ubuntu/hermes-agent/venv/lib/python3.14/site-packages/anthropic/_exceptions.pyr   r          r   r   c                  P   a  ] tR t^t$ R]R&   R]R&   R]R&    R V 3R lltR	tV ;t# )
APIErrorstrmessagehttpx.Requestrequestobject | Nonebodyc               (    V ^8  d   QhRRRRRRRR/# )	   r    r   r"   r!   r$   r#   returnNoner   )formats   "r   __annotate__APIError.__annotate__,   s)       m m X\ r   c               	J   < \         SV `  V4       W n        Wn        W0n        R # )N)super__init__r"   r    r$   )selfr    r"   r$   	__class__s   &&&$r   r.   APIError.__init__,   s    !	r   )r$   r    r"   r   r   r   r   __annotations__r.   r   __classcell__r0   s   @r   r   r      s#    L
 r   r   c                  L   a  ] tR t^3t$ R]R&   R]R&   RR/R V 3R llltR	tV ;t# )
APIResponseValidationErrorhttpx.Responseresponseintstatus_coder    Nc               (    V ^8  d   QhRRRRRRRR/# )	r&   r9   r8   r$   r#   r    
str | Noner'   r(   r   )r)   s   "r   r*   'APIResponseValidationError.__annotate__7   s*     0 0 0} 0R\ 0hl 0r   c               	   < \         ST `  T;'       g    R VP                  VR7       Wn        VP                  V n        R# )z1Data returned by API invalid for expected schema.r$   N)r-   r.   r"   r9   r;   )r/   r9   r$   r    r0   s   &&&$r   r.   #APIResponseValidationError.__init__7   s;    WW$WYaYiYiptu #//r   )r9   r;   r2   r5   s   @r   r7   r7   3   s&    0_c 0 0 0r   r7   c                  \   a  ] tR t^=t$ RtR]R&   R]R&   R]R&   R]R	&   R
 V 3R lltRtV ;t# )APIStatusErrorz<Raised when an API response has a status code of 4xx or 5xx.r8   r9   r:   r;   r=   
request_idzErrorType | Nonetypec               (    V ^8  d   QhRRRRRRRR/# )	r&   r    r   r9   r8   r$   r#   r'   r(   r   )r)   s   "r   r*   APIStatusError.__annotate__E   s/     
L 
L 
L. 
L 
LZ^ 
Lr   c               	  < \         SV `  WP                  VR 7       W n        VP                  V n        VP
                  P                  R4      V n        RV n        \        V4      '       dX   VP                  R4      p\        V4      '       d4   \        \        \        R3,          VP                  R4      4      V n        R# R# R# )r@   z
request-idNerrorrE   )r-   r.   r"   r9   r;   headersgetrD   rE   r   r   r   r   )r/   r    r9   r$   rI   r0   s   &&$$ r   r.   APIStatusError.__init__E   s    "2"2> #//"**..|<	4==HHW%Eu~~ y$!769JK	  r   )rD   r9   r;   rE   )	r   r   r   r   __doc__r3   r.   r   r4   r5   s   @r   rC   rC   =   s*    F

L 
Lr   rC   c                  6   a  ] tR t^RtRR/R V 3R llltRtV ;t# )APIConnectionErrorr    zConnection error.c               $    V ^8  d   QhRRRRRR/# )r&   r    r   r"   r!   r'   r(   r   )r)   s   "r   r*   APIConnectionError.__annotate__S   s"     6 63 6} 6Y] 6r   c               	*   < \         SV `  WR R7       R # )Nr@   r-   r.   )r/   r    r"   r0   s   &$$r   r.   APIConnectionError.__init__S   s    5r   r   r   r   r   r   r.   r   r4   r5   s   @r   rO   rO   R   s    6)< 6 6 6r   rO   c                  .   a  ] tR t^WtR V 3R lltRtV ;t# )APITimeoutErrorc                    V ^8  d   QhRRRR/# )r&   r"   r!   r'   r(   r   )r)   s   "r   r*   APITimeoutError.__annotate__X   s     
 
 
$ 
r   c                	*   < \         SV `  R VR7       R# )zRequest timed out or interrupted. This could be due to a network timeout, dropped connection, or request cancellation. See https://docs.anthropic.com/en/api/errors#long-requests for more details.)r    r"   NrS   )r/   r"   r0   s   &&r   r.   APITimeoutError.__init__X   s     Z 	 	
r   r   rU   r5   s   @r   rW   rW   W   s    
 
r   rW   c                  &    ] tR t^_t$ RtR]R&   RtR# )r	   i  zLiteral[400]r;   r   Nr   r   r   r   r;   r3   r   r   r   r   r	   r	   _        #K#r   c                  &    ] tR t^ct$ RtR]R&   RtR# )r
   i  zLiteral[401]r;   r   Nr]   r   r   r   r
   r
   c   r^   r   c                  &    ] tR t^gt$ RtR]R&   RtR# )r   i  zLiteral[403]r;   r   Nr]   r   r   r   r   r   g   r^   r   c                  &    ] tR t^kt$ RtR]R&   RtR# )r   i  zLiteral[404]r;   r   Nr]   r   r   r   r   r   k   r^   r   c                  &    ] tR t^ot$ RtR]R&   RtR# )r   i  zLiteral[409]r;   r   Nr]   r   r   r   r   r   o   r^   r   c                  &    ] tR t^st$ RtR]R&   RtR# )RequestTooLargeErrori  zLiteral[413]r;   r   Nr]   r   r   r   rd   rd   s   r^   r   rd   c                  &    ] tR t^wt$ RtR]R&   RtR# )r   i  zLiteral[422]r;   r   Nr]   r   r   r   r   r   w   r^   r   c                  &    ] tR t^{t$ RtR]R&   RtR# )r   i  zLiteral[429]r;   r   Nr]   r   r   r   r   r   {   r^   r   c                  &    ] tR t^t$ RtR]R&   RtR# )ServiceUnavailableErrori  zLiteral[503]r;   r   Nr]   r   r   r   rh   rh      r^   r   rh   c                  &    ] tR t^t$ RtR]R&   RtR# )OverloadedErrori  zLiteral[529]r;   r   Nr]   r   r   r   rj   rj      r^   r   rj   c                  &    ] tR t^t$ RtR]R&   RtR# )DeadlineExceededErrori  zLiteral[504]r;   r   Nr]   r   r   r   rl   rl      r^   r   rl   c                      ] tR t^tRtR# )r   r   Nr   r   r   r   r   r      r   r   )r	   r
   r   r   r   r   r   r   ) 
__future__r   typingr   r   typing_extensionsr   httpx_utilsr   types.shared.error_typer   __all__	Exceptionr   r   r7   rC   rO   rW   r	   r
   r   r   r   rd   r   r   rh   rj   rl   r   r   r   r   <module>rv      s    #  %   .		Y 	~ ,0 0LX L*6 6

( 
$n $$. $$N $$N $$N $$> $$~ $$^ $$n $$n $$N $	. 	r   