aboutsummaryrefslogtreecommitdiff
path: root/errors.go
diff options
context:
space:
mode:
Diffstat (limited to 'errors.go')
-rw-r--r--errors.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/errors.go b/errors.go
index 7e5bc17..4aadab6 100644
--- a/errors.go
+++ b/errors.go
@@ -6,6 +6,18 @@ import (
"io"
)
+// Problem description
+type Problem struct {
+ Type string `json:"type"`
+ Detail string `json:"detail"`
+ Instance string `json:"instance"`
+ Err error `json:"-"`
+}
+
+func (p Problem) Error() string {
+ return p.Detail
+}
+
var (
ErrBadCSR = errors.New("CSR is unacceptable")
ErrBadNonce = errors.New("Client sent an unacceptable anti-replay nonce")