mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
log error on header/avatar fetch fail
This commit is contained in:
@@ -104,6 +104,8 @@ func (c *converter) AccountToAPIAccountPublic(ctx context.Context, a *gtsmodel.A
|
||||
avi, err := c.db.GetAttachmentByID(ctx, a.AvatarMediaAttachmentID)
|
||||
if err == nil {
|
||||
a.AvatarMediaAttachment = avi
|
||||
} else {
|
||||
logrus.Errorf("AccountToAPIAccountPublic: error getting Avatar with id %s: %s", a.AvatarMediaAttachmentID, err)
|
||||
}
|
||||
}
|
||||
if a.AvatarMediaAttachment != nil {
|
||||
@@ -120,6 +122,8 @@ func (c *converter) AccountToAPIAccountPublic(ctx context.Context, a *gtsmodel.A
|
||||
avi, err := c.db.GetAttachmentByID(ctx, a.HeaderMediaAttachmentID)
|
||||
if err == nil {
|
||||
a.HeaderMediaAttachment = avi
|
||||
} else {
|
||||
logrus.Errorf("AccountToAPIAccountPublic: error getting Header with id %s: %s", a.HeaderMediaAttachmentID, err)
|
||||
}
|
||||
}
|
||||
if a.HeaderMediaAttachment != nil {
|
||||
|
Reference in New Issue
Block a user