error.rb 2.51 KB
Newer Older
1
class Acme::Client::Error < StandardError
2
  class Timeout < Acme::Client::Error; end
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

  class ClientError < Acme::Client::Error; end
  class InvalidDirectory < ClientError; end
  class UnsupportedOperation < ClientError; end
  class UnsupportedChallengeType < ClientError; end
  class NotFound < ClientError; end
  class CertificateNotReady < ClientError; end

  class ServerError < Acme::Client::Error; end
  class BadCSR < ServerError; end
  class BadNonce < ServerError; end
  class BadSignatureAlgorithm < ServerError; end
  class InvalidContact < ServerError; end
  class UnsupportedContact < ServerError; end
  class ExternalAccountRequired < ServerError; end
  class AccountDoesNotExist < ServerError; end
  class Malformed < ServerError; end
  class RateLimited < ServerError; end
  class RejectedIdentifier < ServerError; end
  class ServerInternal < ServerError; end
  class Unauthorized < ServerError; end
  class UnsupportedIdentifier < ServerError; end
  class UserActionRequired < ServerError; end
  class BadRevocationReason < ServerError; end
  class Caa < ServerError; end
  class Dns < ServerError; end
  class Connection < ServerError; end
  class Tls < ServerError; end
  class IncorrectResponse < ServerError; end

  ACME_ERRORS = {
    'urn:ietf:params:acme:error:badCSR' => BadCSR,
    'urn:ietf:params:acme:error:badNonce' => BadNonce,
    '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: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
  }
55
end