Do not return an error if the user session is not found
This commit is contained in:
parent
02ba735ba9
commit
15202b8675
1 changed files with 1 additions and 1 deletions
|
@ -82,7 +82,7 @@ func (s *Storage) UserSessionByToken(token string) (*model.UserSession, error) {
|
||||||
)
|
)
|
||||||
|
|
||||||
if err == sql.ErrNoRows {
|
if err == sql.ErrNoRows {
|
||||||
return nil, fmt.Errorf("user session not found: %s", token)
|
return nil, nil
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
return nil, fmt.Errorf("unable to fetch user session: %v", err)
|
return nil, fmt.Errorf("unable to fetch user session: %v", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue