Skip to content

Commit abf6f28

Browse files
authored
if there is no cause, do blank (keybase#17004)
1 parent cb6061a commit abf6f28

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎go/kbcrypto/nacl_sig_info.go‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,15 @@ func (e VerificationError) Error() string {
5858
}
5959

6060
func (e VerificationError) ToStatus() keybase1.Status {
61+
cause := ""
62+
if e.Cause != nil {
63+
cause = e.Cause.Error()
64+
}
6165
return keybase1.Status{
6266
Code: SCSigCannotVerify,
6367
Name: "SC_SIG_CANNOT_VERIFY",
6468
Fields: []keybase1.StringKVPair{
65-
{Key: "Cause", Value: e.Cause.Error()},
69+
{Key: "Cause", Value: cause},
6670
},
6771
}
6872
}

0 commit comments

Comments
 (0)