Skip to content
Snippets Groups Projects
Commit 97ba3567 authored by Jake Taylor's avatar Jake Taylor :lips:
Browse files

minor error fix

parent 0e356be3
No related branches found
No related tags found
No related merge requests found
////////////////////////////////////////////////////////////////////////////////
// Copyright © 2020 Privategrity Corporation /
// /
// All rights reserved. /
////////////////////////////////////////////////////////////////////////////////
package api
import (
......@@ -111,12 +117,10 @@ func (cl *Client) RegisterWithUDB(username string, timeout time.Duration) error
publicKeyBytes := cl.session.GetE2EDHPublicKey().Bytes()
err = bots.Register(valueType, username, publicKeyBytes, cl.opStatus, timeout)
if err == nil {
globals.Log.INFO.Printf("Registered with UDB!")
} else {
globals.Log.WARN.Printf("Could not register with UDB: %s", err)
if err != nil {
return errors.Errorf("Could not register with UDB: %s", err)
}
globals.Log.INFO.Printf("Registered with UDB!")
} else {
globals.Log.INFO.Printf("Not registering with UDB because no " +
"email found")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment