feedback, typos, renaming

This commit is contained in:
Aine
2022-10-10 09:41:22 +03:00
parent d575552237
commit 6f4da59387
8 changed files with 57 additions and 55 deletions

View File

@@ -73,7 +73,9 @@ func (b *Bot) Error(ctx context.Context, roomID id.RoomID, message string, args
b.log.Error(message, args...)
err := fmt.Errorf(message, args...)
sentry.GetHubFromContext(ctx).CaptureException(err)
if hub := sentry.GetHubFromContext(ctx); hub != nil {
sentry.GetHubFromContext(ctx).CaptureException(err)
}
if roomID != "" {
b.SendError(ctx, roomID, err.Error())
}