a }|g @ sH d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl Z ej rbddlmZ G d d d e ZG dd deZG d d dejZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd d eZG d!d" d"eZG d#d$ d$eZdS )%zACME errors. N)Any)List)Mapping)Set)errors)messagesc @ s e Zd ZdZdS )ErrorzGeneric ACME error.N__name__ __module____qualname____doc__ r r //usr/lib/python3.9/site-packages/acme/errors.pyr s r c @ s e Zd ZdZdS )DependencyErrorzDependency errorNr r r r r r s r c @ s e Zd ZdZdS )SchemaValidationErrorz)JSON schema ACME object validation error.Nr r r r r r s r c @ s e Zd ZdZdS )ClientErrorzNetwork error.Nr r r r r r s r c @ s e Zd ZdZdS )UnexpectedUpdatezUnexpected update error.Nr r r r r r ! s r c @ s e Zd ZdZdS ) NonceErrorzServer response nonce error.Nr r r r r r % s r c s: e Zd ZdZeeedd fddZedddZ Z S ) BadNoncezBad nonce error.N)nonceerrorargsreturnc s t j| || _|| _d S N)super__init__r r )selfr r r __class__r r r + s zBadNonce.__init__r c C s d | j| jS )NzInvalid nonce ({0!r}): {1})formatr r r r r r __str__0 s zBadNonce.__str__) r r r r str Exceptionr r r# __classcell__r r r r r ) s r c s: e Zd ZdZejedd fddZedddZ Z S ) MissingNoncezMissing nonce error. According to the specification an "ACME server MUST include an Replay-Nonce header field in each successful response to a POST it provides to a client (...)". :ivar requests.Response ~.response: HTTP Response N)responser r c s t j| || _d S r )r r r( )r r( r r r r r > s zMissingNonce.__init__r c C s d | jjj| jjS )Nz_Server {0} response did not include a replay nonce, headers: {1} (This may be a service outage))r! r( ZrequestmethodZheadersr" r r r r# B s zMissingNonce.__str__)r r r r requestsZResponser r r$ r# r&