summaryrefslogtreecommitdiff
path: root/internal/typeutils/internaltoas.go
diff options
context:
space:
mode:
authorLibravatar tsmethurst <tobi.smethurst@protonmail.com>2022-02-08 12:37:58 +0100
committerLibravatar tsmethurst <tobi.smethurst@protonmail.com>2022-02-08 12:37:58 +0100
commitc4ece24654e195dbff06c1d7363c5fe92e1fd4c4 (patch)
tree9fa396057b525291586199bdc4c124d6aec8f9bd /internal/typeutils/internaltoas.go
parentgo fmt (diff)
downloadgotosocial-c4ece24654e195dbff06c1d7363c5fe92e1fd4c4.tar.xz
log error on header/avatar fetch fail
Diffstat (limited to 'internal/typeutils/internaltoas.go')
-rw-r--r--internal/typeutils/internaltoas.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/typeutils/internaltoas.go b/internal/typeutils/internaltoas.go
index a22b926d6..f154398ce 100644
--- a/internal/typeutils/internaltoas.go
+++ b/internal/typeutils/internaltoas.go
@@ -25,6 +25,7 @@ import (
"fmt"
"net/url"
+ "github.com/sirupsen/logrus"
"github.com/spf13/viper"
"github.com/superseriousbusiness/activity/pub"
"github.com/superseriousbusiness/activity/streams"
@@ -218,6 +219,8 @@ func (c *converter) AccountToAS(ctx context.Context, a *gtsmodel.Account) (vocab
avatar, err := c.db.GetAttachmentByID(ctx, a.AvatarMediaAttachmentID)
if err == nil {
a.AvatarMediaAttachment = avatar
+ } else {
+ logrus.Errorf("AccountToAS: error getting Avatar with id %s: %s", a.AvatarMediaAttachmentID, err)
}
}
@@ -250,6 +253,8 @@ func (c *converter) AccountToAS(ctx context.Context, a *gtsmodel.Account) (vocab
header, err := c.db.GetAttachmentByID(ctx, a.HeaderMediaAttachmentID)
if err == nil {
a.HeaderMediaAttachment = header
+ } else {
+ logrus.Errorf("AccountToAS: error getting Header with id %s: %s", a.HeaderMediaAttachmentID, err)
}
}