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