aboutsummaryrefslogtreecommitdiff
path: root/errors.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-11-28 10:22:29 +0100
committerDimitri Sokolyuk <demon@dim13.org>2015-11-28 10:22:29 +0100
commitf846e741db51ff8e6a2010ebb532f7dbb0edca7c (patch)
treef8bc823167818de740d77c781faa1086f4fe85af /errors.go
parenta3f0d00aa2d2497484950b375717a2de81cc5aa7 (diff)
Split errors
Diffstat (limited to 'errors.go')
-rw-r--r--errors.go31
1 files changed, 22 insertions, 9 deletions
diff --git a/errors.go b/errors.go
index ce04bf6..bbfeea3 100644
--- a/errors.go
+++ b/errors.go
@@ -2,14 +2,27 @@ package acme
import "errors"
+var (
+ errBadCSR = errors.New("The CSR is unacceptable (e.g., due to a short key)")
+ errBadNonce = errors.New("The client sent an unacceptable anti-replay nonce")
+ errConnection = errors.New("The server could not connect to the client for DV")
+ errDnssec = errors.New("The server could not validate a DNSSEC signed domain")
+ errMalformed = errors.New("The request message was malformed")
+ errServerInternal = errors.New("The server experienced an internal error")
+ errTLS = errors.New("The server experienced a TLS error during DV")
+ errUnauthorized = errors.New("The client lacks sufficient authorization")
+ errUnknownHost = errors.New("The server could not resolve a domain name")
+)
+
+// Errors
var Errors = map[string]error{
- "badCSR": errors.New("The CSR is unacceptable (e.g., due to a short key)"),
- "badNonce": errors.New("The client sent an unacceptable anti-replay nonce"),
- "connection": errors.New("The server could not connect to the client for DV"),
- "dnssec": errors.New("The server could not validate a DNSSEC signed domain"),
- "malformed": errors.New("The request message was malformed"),
- "serverInternal": errors.New("The server experienced an internal error"),
- "tls": errors.New("The server experienced a TLS error during DV"),
- "unauthorized": errors.New("The client lacks sufficient authorization"),
- "unknownHost": errors.New("The server could not resolve a domain name"),
+ "badCSR": errBadCSR,
+ "badNonce": errBadNonce,
+ "connection": errConnection,
+ "dnssec": errDnssec,
+ "malformed": errMalformed,
+ "serverInternal": errServerInternal,
+ "tls": errTLS,
+ "unauthorized": errUnauthorized,
+ "unknownHost": errUnknownHost,
}