From 2a64caec09cf476aa0c805d54747c1cc290d8b6b Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Fri, 31 May 2024 12:26:24 +0200 Subject: [PATCH] [core] Fix: Include username and channel in ban errors Signed-off-by: Knut Ahlers --- pkg/twitch/moderation.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/twitch/moderation.go b/pkg/twitch/moderation.go index 597224a..1479148 100644 --- a/pkg/twitch/moderation.go +++ b/pkg/twitch/moderation.go @@ -58,7 +58,7 @@ func (c *Client) BanUser(ctx context.Context, channel, username string, duration return errors.Wrap(err, "encoding payload") } - return errors.Wrap( + return errors.Wrapf( c.Request(ctx, ClientRequestOpts{ AuthType: AuthTypeBearerToken, Method: http.MethodPost, @@ -89,7 +89,7 @@ func (c *Client) BanUser(ctx context.Context, channel, username string, duration return ValidateStatus(opts, resp) }, }), - "executing ban request", + "executing ban request for %q in %q", username, channel, ) }