From: Michael Tremer Date: Tue, 24 Jun 2025 17:01:06 +0000 (+0000) Subject: client: Log an error when we want to use authentication without being authenticated X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e5c66ac4723a66e41cb83874b0c6a863c2a25b6;p=pakfire.git client: Log an error when we want to use authentication without being authenticated Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/client.c b/src/pakfire/client.c index 6925279c..deeb948d 100644 --- a/src/pakfire/client.c +++ b/src/pakfire/client.c @@ -170,8 +170,10 @@ static int pakfire_client_xfer_auth(struct pakfire_client* self, struct pakfire_ int r; // Fail if not authenticated - if (!*self->auth.access_token) + if (!*self->auth.access_token) { + ERROR(self->ctx, "Authentication requested, but the client is not authenticated\n"); return -ENOTSUP; + } // Set the access token r = pakfire_xfer_add_header(xfer, "Authorization: Bearer %s", self->auth.access_token);