
    (ph7!                        S r SrSrSrSrSrSrSrSrS	r	S
r
SrSrSrSrSrSr " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S \5      r " S! S"\5      r " S# S$\5      r " S% S&\5      r " S' S(\5      r " S) S*\5      r " S+ S,\5      r " S- S.\5      r  " S/ S0\5      r! " S1 S2\5      r"g3)4a9  Firebase Exceptions module.

This module defines the base types for exceptions and the platform-wide error codes as outlined in
https://cloud.google.com/apis/design/errors.

:class:`FirebaseError` is the parent class of all exceptions raised by the Admin SDK. It contains
the ``code``, ``http_response`` and ``cause`` properties common to all Firebase exception types.
Each exception also carries a message that outlines what went wrong. This can be logged for
audit or debugging purposes.

When calling an Admin SDK API, developers can catch the parent ``FirebaseError`` and
inspect its ``code`` to implement fine-grained error handling. Alternatively, developers can
catch one or more subtypes of ``FirebaseError``. Under normal conditions, any given API can raise
only a small subset of the available exception subtypes. However, the SDK also exposes rare error
conditions like connection timeouts and other I/O errors as instances of ``FirebaseError``.
Therefore it is always a good idea to have a handler specified for ``FirebaseError``, after all the
subtype error handlers.
INVALID_ARGUMENTFAILED_PRECONDITIONOUT_OF_RANGEUNAUTHENTICATEDPERMISSION_DENIED	NOT_FOUNDCONFLICTABORTEDALREADY_EXISTSRESOURCE_EXHAUSTED	CANCELLED	DATA_LOSSUNKNOWNINTERNALUNAVAILABLEDEADLINE_EXCEEDEDc                   R    \ rS rSrSrS	S jr\S 5       r\S 5       r\S 5       r	Sr
g)
FirebaseErrorT   a  Base class for all errors raised by the Admin SDK.

Args:
    code: A string error code that represents the type of the exception. Possible error
        codes are defined in https://cloud.google.com/apis/design/errors#handling_errors.
    message: A human-readable error message string.
    cause: The exception that caused this error (optional).
    http_response: If this error was caused by an HTTP error response, this property is
        set to the ``requests.Response`` object that represents the HTTP response (optional).
        See https://2.python-requests.org/en/master/api/#requests.Response for details of
        this object.
Nc                 R    [         R                  X5        Xl        X0l        X@l        g N)	Exception__init___code_cause_http_response)selfcodemessagecausehttp_responses        L/var/www/html/venv/lib/python3.13/site-packages/firebase_admin/exceptions.pyr   FirebaseError.__init__b   s     4)
+    c                     U R                   $ r   )r   r   s    r!   r   FirebaseError.codeh   s    zzr#   c                     U R                   $ r   )r   r%   s    r!   r   FirebaseError.causel   s    {{r#   c                     U R                   $ r   )r   r%   s    r!   r    FirebaseError.http_responsep   s    """r#   )r   r   r   NN)__name__
__module____qualname____firstlineno____doc__r   propertyr   r   r    __static_attributes__ r#   r!   r   r   T   sH    ,     # #r#   r   c                   "    \ rS rSrSrSS jrSrg)InvalidArgumentErroru   z%Client specified an invalid argument.Nc                 <    [         R                  U [        XU5        g r   )r   r   r   r   r   r   r    s       r!   r   InvalidArgumentError.__init__x   s    t%5w}Ur#   r3   r+   r,   r-   r.   r/   r0   r   r2   r3   r#   r!   r5   r5   u   s    /Vr#   r5   c                   "    \ rS rSrSrSS jrSrg)FailedPreconditionError|   z`Request can not be executed in the current system state, such as deleting a non-empty
directory.Nc                 <    [         R                  U [        XU5        g r   )r   r   r   r8   s       r!   r    FailedPreconditionError.__init__   s    t%8'-Xr#   r3   r+   r:   r3   r#   r!   r<   r<   |   s    Yr#   r<   c                   "    \ rS rSrSrSS jrSrg)OutOfRangeError   z"Client specified an invalid range.Nc                 <    [         R                  U [        XU5        g r   )r   r   r   r8   s       r!   r   OutOfRangeError.__init__   s    t\7=Qr#   r3   r+   r:   r3   r#   r!   rA   rA      s    ,Rr#   rA   c                   "    \ rS rSrSrSS jrSrg)UnauthenticatedError   zJRequest not authenticated due to missing, invalid, or expired OAuth token.Nc                 <    [         R                  U [        XU5        g r   )r   r   r   r8   s       r!   r   UnauthenticatedError.__init__   s    t_gmTr#   r3   r+   r:   r3   r#   r!   rF   rF      s    TUr#   rF   c                   "    \ rS rSrSrSS jrSrg)PermissionDeniedError   zClient does not have sufficient permission.

This can happen because the OAuth token does not have the right scopes, the client doesn't
have permission, or the API has not been enabled for the client project.
Nc                 <    [         R                  U [        XU5        g r   )r   r   r   r8   s       r!   r   PermissionDeniedError.__init__       t%6Vr#   r3   r+   r:   r3   r#   r!   rK   rK      s    Wr#   rK   c                   "    \ rS rSrSrSS jrSrg)NotFoundError   zkA specified resource is not found, or the request is rejected by undisclosed reasons, such
as whitelisting.Nc                 <    [         R                  U [        XU5        g r   )r   r   r   r8   s       r!   r   NotFoundError.__init__       tYNr#   r3   r+   r:   r3   r#   r!   rQ   rQ      s    Or#   rQ   c                   "    \ rS rSrSrSS jrSrg)ConflictError   9Concurrency conflict, such as read-modify-write conflict.Nc                 <    [         R                  U [        XU5        g r   )r   r   r   r8   s       r!   r   ConflictError.__init__       tXw}Mr#   r3   r+   r:   r3   r#   r!   rW   rW      s    CNr#   rW   c                   "    \ rS rSrSrSS jrSrg)AbortedError   rY   Nc                 <    [         R                  U [        XU5        g r   )r   r   r	   r8   s       r!   r   AbortedError.__init__       tWgmLr#   r3   r+   r:   r3   r#   r!   r^   r^      s    CMr#   r^   c                   "    \ rS rSrSrSS jrSrg)AlreadyExistsError   z:The resource that a client tried to create already exists.Nc                 <    [         R                  U [        XU5        g r   )r   r   r
   r8   s       r!   r   AlreadyExistsError.__init__   s    t^W]Sr#   r3   r+   r:   r3   r#   r!   rd   rd      s    DTr#   rd   c                   "    \ rS rSrSrSS jrSrg)ResourceExhaustedError   z7Either out of resource quota or reaching rate limiting.Nc                 <    [         R                  U [        XU5        g r   )r   r   r   r8   s       r!   r   ResourceExhaustedError.__init__   s    t%7Wr#   r3   r+   r:   r3   r#   r!   ri   ri      s    AXr#   ri   c                   "    \ rS rSrSrSS jrSrg)CancelledError   z Request cancelled by the client.Nc                 <    [         R                  U [        XU5        g r   )r   r   r   r8   s       r!   r   CancelledError.__init__   rU   r#   r3   r+   r:   r3   r#   r!   rn   rn      s    *Or#   rn   c                   "    \ rS rSrSrSS jrSrg)DataLossError   z+Unrecoverable data loss or data corruption.Nc                 <    [         R                  U [        XU5        g r   )r   r   r   r8   s       r!   r   DataLossError.__init__   rU   r#   r3   r+   r:   r3   r#   r!   rs   rs      s    5Or#   rs   c                   "    \ rS rSrSrSS jrSrg)UnknownError   zUnknown server error.Nc                 <    [         R                  U [        XU5        g r   )r   r   r   r8   s       r!   r   UnknownError.__init__   rb   r#   r3   r+   r:   r3   r#   r!   rx   rx      s    Mr#   rx   c                   "    \ rS rSrSrSS jrSrg)InternalError   zInternal server error.Nc                 <    [         R                  U [        XU5        g r   )r   r   r   r8   s       r!   r   InternalError.__init__   r\   r#   r3   r+   r:   r3   r#   r!   r}   r}      s     Nr#   r}   c                   "    \ rS rSrSrSS jrSrg)UnavailableError   z2Service unavailable. Typically the server is down.Nc                 <    [         R                  U [        XU5        g r   )r   r   r   r8   s       r!   r   UnavailableError.__init__   s    t['-Pr#   r3   r+   r:   r3   r#   r!   r   r      s    <Qr#   r   c                   "    \ rS rSrSrSS jrSrg)DeadlineExceededError   a  Request deadline exceeded.

This will happen only if the caller sets a deadline that is shorter than the method's
default deadline (i.e. requested deadline is not enough for the server to process the
request) and the request did not finish within the deadline.
Nc                 <    [         R                  U [        XU5        g r   )r   r   r   r8   s       r!   r   DeadlineExceededError.__init__   rO   r#   r3   r+   r:   r3   r#   r!   r   r      s    Wr#   r   N)#r0   r   r   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r5   r<   rA   rF   rK   rQ   rW   r^   rd   ri   rn   rs   rx   r}   r   r   r3   r#   r!   <module>r      sl  * &  ,   $ (  	   " *  	 	    ( #I #BV= VYm YRm RU= UWM WOM ONM NM= MT TX] XO] OOM OM= MNM NQ} Q	WM 	Wr#   