
    $gD                         d dl mZmZmZmZ ddlmZ ddlmZ erddl	m
Z
 dgZ	 	 dd	ed
eeded         f                  deeeeef                           defdZdS )    )TYPE_CHECKING
CollectionOptionalUnion   )inspect   )GraphQLError)Nodelocated_errorNoriginal_errornodesNoner   pathreturnc                    t          | t                    st          dt          |                      } t          | t                    r	| j        | S 	 t          | j                  }n# t          $ r t          |           }Y nw xY w	 | j	        }n# t          $ r d}Y nw xY w	 | j
        }n# t          $ r d}Y nw xY w	 | j        p|}n# t          $ r Y nw xY wt	          ||||||           S )zLocated GraphQL Error

    Given an arbitrary Exception, presumably thrown while attempting to execute a
    GraphQL operation, produce a new GraphQLError aware of the location in the document
    responsible for the original Exception.
    zUnexpected error value: N)
isinstance	Exception	TypeErrorr   r
   r   strmessageAttributeErrorsource	positionsr   )r   r   r   r   r   r   s         [/var/www/html/netbox-4.1.3/venv/lib/python3.11/site-packages/graphql/error/located_error.pyr   r      sL    ni00 Y"#Wgn>U>U#W#WXX .,// N4G4S&n,-- & & &n%%&&   ",		   			$-   	4PPPsH   A) )BB	B B B $B, ,B;:B;?	C	 	
CC)NN)typingr   r   r   r   pyutilsr   graphql_errorr
   language.astr   __all__r   r   intr        r   <module>r$      s    = = = = = = = = = = = =       ' ' ' ' ' ' $######

 :>26&Q &Q&QE&*V"4456&Q :eCHo.
/&Q 	&Q &Q &Q &Q &Q &Qr#   