Add extra logs for account not found, peer login and getAccount (#2053)

This commit is contained in:
Maycon Santos
2024-05-27 12:29:28 +02:00
committed by GitHub
parent d4c47eaf8a
commit f176807ebe
3 changed files with 4 additions and 2 deletions

View File

@@ -390,7 +390,7 @@ func (s *SqlStore) GetAccount(accountID string) (*Account, error) {
Preload(clause.Associations).
First(&account, "id = ?", accountID)
if result.Error != nil {
log.Errorf("error when getting account from the store: %s", result.Error)
log.Errorf("error when getting account %s from the store: %s", accountID, result.Error)
if errors.Is(result.Error, gorm.ErrRecordNotFound) {
return nil, status.Errorf(status.NotFound, "account not found")
}