aboutsummaryrefslogtreecommitdiff
path: root/errors.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-02-03 16:49:50 +0100
committerDimitri Sokolyuk <demon@dim13.org>2016-02-03 16:49:50 +0100
commit27e126b5c6cf6358143dd5b78e8c2f88f2b5682d (patch)
tree1e665537d505640c962ec15c321a329a394e96d2 /errors.go
parent6fcfde44e2bc7612f779161a289c57575b79d7e0 (diff)
Move Problem to errors
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")