diff --git a/oci-authenticator/flatpak-oci-authenticator.c b/oci-authenticator/flatpak-oci-authenticator.c index d351fc57..d98326ac 100644 --- a/oci-authenticator/flatpak-oci-authenticator.c +++ b/oci-authenticator/flatpak-oci-authenticator.c @@ -496,6 +496,8 @@ handle_request_ref_tokens (FlatpakAuthenticator *authenticator, first_token = get_token_for_ref (registry, ref_data, NULL, &error); if (first_token != NULL) have_auth = TRUE; + else + g_clear_error (&error); } /* Prompt the user for credentials */ @@ -520,6 +522,11 @@ handle_request_ref_tokens (FlatpakAuthenticator *authenticator, auth = g_steal_pointer (&test_auth); have_auth = TRUE; } + else + { + g_debug ("Failed to get token: %s", error->message); + g_clear_error (&error); + } } }