aboutsummaryrefslogtreecommitdiff
path: root/client.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-12-20 20:23:19 +0100
committerDimitri Sokolyuk <demon@dim13.org>2015-12-20 20:23:19 +0100
commit442b0b50caafaed87047556dd312928e0605ba37 (patch)
tree6b9b05b452a48a95a556c1b2154cd14918c8bc09 /client.go
parent3e00d0839acf30f8c36d0a8559e514a10daaf1e5 (diff)
Refactor errors
Diffstat (limited to 'client.go')
-rw-r--r--client.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/client.go b/client.go
index 756e649..c67c1c8 100644
--- a/client.go
+++ b/client.go
@@ -96,6 +96,9 @@ func (c *Client) post(s Signer, v interface{}) error {
if err != nil {
return err
}
+ if err, ok := urnErrors[p.Type]; ok {
+ p.Err = err
+ }
return p
}
@@ -157,6 +160,9 @@ func (c *Client) Register(a *Account) (*Registration, error) {
}
c.Location = c.Dir.NewReg
err := c.post(a, r)
+ if err, ok := err.(Problem); ok {
+ log.Println("REGISTER", err.Err, err)
+ }
return r, err
}