aboutsummaryrefslogtreecommitdiff
path: root/account.go
diff options
context:
space:
mode:
Diffstat (limited to 'account.go')
-rw-r--r--account.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/account.go b/account.go
index 3a8d032..fffc339 100644
--- a/account.go
+++ b/account.go
@@ -80,7 +80,10 @@ func (a *Account) Sign(msg []byte, n jose.NonceSource) ([]byte, error) {
a.signer.SetNonceSource(n)
}
obj, err := a.signer.Sign(msg)
- return []byte(obj.FullSerialize()), err
+ if err != nil {
+ return nil, err
+ }
+ return []byte(obj.FullSerialize()), nil
}
func (a *Account) ParseSigned(msg []byte) ([]byte, error) {