[core] Fix: Include username and channel in ban errors

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2024-05-31 12:26:24 +02:00
parent 8e8895d32e
commit 2a64caec09
Signed by: luzifer
SSH Key Fingerprint: SHA256:/xtE5lCgiRDQr8SLxHMS92ZBlACmATUmF1crK16Ks4E

View File

@ -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,
)
}