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

Merge branch 'hotfix/hash-not-found' into 'release'

Add continue to error case

See merge request elixxir/notifications-bot!22
parents d6d3aad3 e8ed8229
No related branches found
No related tags found
2 merge requests!23Release,!22Add continue to error case
......@@ -216,6 +216,7 @@ func notifyUser(ephID int64, data []*notifications.Data, apnsClient *apns.ApnsCo
u, err := db.GetUserByHash(e.TransmissionRSAHash)
if err != nil {
jww.ERROR.Printf("Failed to lookup user with tRSA hash %+v: %+v", e.TransmissionRSAHash, err)
continue
}
isAPNS := !strings.Contains(u.Token, ":")
......
......@@ -18,7 +18,7 @@ func (impl *DatabaseImpl) GetUser(userId []byte) (*User, error) {
u := &User{}
err := impl.db.Take(u, "intermediary_id = ?", userId).Error
if err != nil {
return nil, errors.Errorf("Failed to retrieve user with ID %s: %+v", userId, err)
return nil, err
}
return u, nil
}
......@@ -28,7 +28,7 @@ func (impl *DatabaseImpl) GetUserByHash(transmissionRsaHash []byte) (*User, erro
u := &User{}
err := impl.db.Take(u, "transmission_rsa_hash = ?", transmissionRsaHash).Error
if err != nil {
return nil, errors.Errorf("Failed to retrieve user with tRSA hash %s: %+v", transmissionRsaHash, err)
return nil, err
}
return u, nil
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment