
    >Tf                         d dl mZ d dlm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
dS )    )status)APIException)AbortRequestAbortScriptAbortTransactionPermissionsViolationRQWorkerNotRunningExceptionc                       e Zd ZdZdS )r   zL
    A dummy exception used to trigger a database transaction rollback.
    N__name__
__module____qualname____doc__     9/var/www/html/netbox-4.1.3/netbox/utilities/exceptions.pyr   r                	Dr   r   c                       e Zd ZdZd ZdS )r   zY
    Raised to cleanly abort a request (for example, by a pre_save signal receiver).
    c                     || _         d S )N)message)selfr   s     r   __init__zAbortRequest.__init__   s    r   N)r   r   r   r   r   r   r   r   r   r      s-             r   r   c                       e Zd ZdZdS )r   z+
    Raised to cleanly abort a script.
    Nr   r   r   r   r   r      r   r   r   c                       e Zd ZdZdZdS )r   zf
    Raised when an operation was prevented because it would violate the
    allowed permissions.
    z:Operation failed due to object-level permissions violationN)r   r   r   r   r   r   r   r   r   r   #   s           KGGGr   r   c                   (    e Zd ZdZej        ZdZdZdS )r	   z
    Indicates the temporary inability to enqueue a new task (e.g. custom script execution) because no RQ worker
    processes are currently running.
    z9Unable to process request: RQ worker process not running.rq_worker_not_runningN)	r   r   r   r   r   HTTP_503_SERVICE_UNAVAILABLEstatus_codedefault_detaildefault_coder   r   r   r	   r	   +   s,          5KPN*LLLr   r	   N)rest_frameworkr   rest_framework.exceptionsr   __all__	Exceptionr   r   r   r   r	   r   r   r   <module>r%      s   ! ! ! ! ! ! 2 2 2 2 2 2	 	 	 	 	y 	 	 	    9   	 	 	 	 	) 	 	 	K K K K K9 K K K+ + + + +, + + + + +r   