[chore] improve errors returned fetching account/statues from DB (#1084)

Signed-off-by: kim <grufwub@gmail.com>

Signed-off-by: kim <grufwub@gmail.com>
This commit is contained in:
kim 2022-11-20 16:38:58 +00:00 committed by GitHub
commit 2eea3d57e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 8 deletions

View file

@ -21,6 +21,7 @@ package bundb
import (
"context"
"errors"
"fmt"
"strings"
"time"
@ -168,7 +169,7 @@ func (a *accountDB) getAccount(ctx context.Context, lookup string, dbQuery func(
// Set the account's related emojis
account.Emojis, err = a.emojis.emojisFromIDs(ctx, account.EmojiIDs)
if err != nil {
return nil, err
return nil, fmt.Errorf("error getting account emojis: %w", err)
}
}