mirror of
https://github.com/flatpak/flatpak.git
synced 2026-05-24 16:57:42 -04:00
tokens: Allow authenticators to send an error message
This commit is contained in:
committed by
Alexander Larsson
parent
b77f7c9383
commit
e0cef17c0c
@@ -2834,7 +2834,13 @@ request_tokens_for_remote (FlatpakTransaction *self,
|
||||
}
|
||||
|
||||
if (data.response != FLATPAK_AUTH_RESPONSE_OK)
|
||||
return flatpak_fail (error, "Failed to get tokens for ref");
|
||||
{
|
||||
const char *error_message = NULL;
|
||||
if (g_variant_lookup (results, "error-message", "&s", &error_message))
|
||||
return flatpak_fail (error, "Failed to get tokens for ref: %s", error_message);
|
||||
else
|
||||
return flatpak_fail (error, "Failed to get tokens for ref");
|
||||
}
|
||||
|
||||
tokens = g_variant_lookup_value (results, "tokens", G_VARIANT_TYPE ("a{sas}"));
|
||||
if (tokens == NULL)
|
||||
|
||||
Reference in New Issue
Block a user