Exception: Acme::Client::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Acme::Client::Error
- Defined in:
- lib/acme/client/error.rb
Direct Known Subclasses
Defined Under Namespace
Classes: AccountDoesNotExist, AlreadyReplaced, AlreadyRevoked, BadCSR, BadNonce, BadPublicKey, BadRevocationReason, BadSignatureAlgorithm, Caa, CertificateNotReady, ClientError, Connection, Dns, ExternalAccountRequired, ForcedChainNotFound, IncorrectResponse, InvalidContact, InvalidDirectory, Malformed, NotFound, OrderNotReady, OrderUrlNil, RateLimited, RejectedIdentifier, ServerError, ServerInternal, Subproblem, Timeout, Tls, Unauthorized, UnsupportedChallengeType, UnsupportedContact, UnsupportedIdentifier, UnsupportedOperation, UserActionRequired
Constant Summary collapse
- ACME_ERRORS =
{ 'urn:ietf:params:acme:error:alreadyReplaced' => AlreadyReplaced, 'urn:ietf:params:acme:error:alreadyRevoked' => AlreadyRevoked, 'urn:ietf:params:acme:error:badCSR' => BadCSR, 'urn:ietf:params:acme:error:badNonce' => BadNonce, 'urn:ietf:params:acme:error:badPublicKey' => BadPublicKey, 'urn:ietf:params:acme:error:badSignatureAlgorithm' => BadSignatureAlgorithm, 'urn:ietf:params:acme:error:invalidContact' => InvalidContact, 'urn:ietf:params:acme:error:unsupportedContact' => UnsupportedContact, 'urn:ietf:params:acme:error:externalAccountRequired' => ExternalAccountRequired, 'urn:ietf:params:acme:error:accountDoesNotExist' => AccountDoesNotExist, 'urn:ietf:params:acme:error:malformed' => Malformed, 'urn:ietf:params:acme:error:orderNotReady' => OrderNotReady, 'urn:ietf:params:acme:error:rateLimited' => RateLimited, 'urn:ietf:params:acme:error:rejectedIdentifier' => RejectedIdentifier, 'urn:ietf:params:acme:error:serverInternal' => ServerInternal, 'urn:ietf:params:acme:error:unauthorized' => Unauthorized, 'urn:ietf:params:acme:error:unsupportedIdentifier' => UnsupportedIdentifier, 'urn:ietf:params:acme:error:userActionRequired' => UserActionRequired, 'urn:ietf:params:acme:error:badRevocationReason' => BadRevocationReason, 'urn:ietf:params:acme:error:caa' => Caa, 'urn:ietf:params:acme:error:dns' => Dns, 'urn:ietf:params:acme:error:connection' => Connection, 'urn:ietf:params:acme:error:tls' => Tls, 'urn:ietf:params:acme:error:incorrectResponse' => IncorrectResponse }
Instance Attribute Summary collapse
-
#acme_error_body ⇒ Object
readonly
Returns the value of attribute acme_error_body.
-
#retry_after ⇒ Object
readonly
Returns the value of attribute retry_after.
-
#retry_after_time ⇒ Object
readonly
Returns the value of attribute retry_after_time.
-
#subproblems ⇒ Object
readonly
Returns the value of attribute subproblems.
Instance Method Summary collapse
-
#initialize(message = nil, retry_after: nil, acme_error_body: nil, subproblems: nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message = nil, retry_after: nil, acme_error_body: nil, subproblems: nil) ⇒ Error
Returns a new instance of Error.
10 11 12 13 14 15 16 |
# File 'lib/acme/client/error.rb', line 10 def initialize( = nil, retry_after: nil, acme_error_body: nil, subproblems: nil) super() @retry_after_time = Acme::Client::Util.parse_retry_after(retry_after) @retry_after = @retry_after_time ? [(@retry_after_time - Time.now).ceil, 0].max : nil @acme_error_body = acme_error_body @subproblems = parse_subproblems(subproblems) end |
Instance Attribute Details
#acme_error_body ⇒ Object (readonly)
Returns the value of attribute acme_error_body.
2 3 4 |
# File 'lib/acme/client/error.rb', line 2 def acme_error_body @acme_error_body end |
#retry_after ⇒ Object (readonly)
Returns the value of attribute retry_after.
2 3 4 |
# File 'lib/acme/client/error.rb', line 2 def retry_after @retry_after end |
#retry_after_time ⇒ Object (readonly)
Returns the value of attribute retry_after_time.
2 3 4 |
# File 'lib/acme/client/error.rb', line 2 def retry_after_time @retry_after_time end |
#subproblems ⇒ Object (readonly)
Returns the value of attribute subproblems.
2 3 4 |
# File 'lib/acme/client/error.rb', line 2 def subproblems @subproblems end |