[gnome-software] trivial: Convert some ERROR_FAILED to ERROR_AUTH_INVALID



commit 90ddb327e3153057250746ae0bb126cad0dd9307
Author: Richard Hughes <richard hughsie com>
Date:   Wed Sep 7 15:13:19 2016 +0100

    trivial: Convert some ERROR_FAILED to ERROR_AUTH_INVALID

 src/plugins/gs-plugin-snap.c      |    4 ++--
 src/plugins/gs-plugin-ubuntuone.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/gs-plugin-snap.c b/src/plugins/gs-plugin-snap.c
index 354072a..528ca93 100644
--- a/src/plugins/gs-plugin-snap.c
+++ b/src/plugins/gs-plugin-snap.c
@@ -748,7 +748,7 @@ gs_plugin_auth_login (GsPlugin *plugin, GsAuth *auth,
        if (!json_object_has_member (result, "macaroon")) {
                g_set_error_literal (error,
                                     GS_PLUGIN_ERROR,
-                                    GS_PLUGIN_ERROR_FAILED,
+                                    GS_PLUGIN_ERROR_AUTH_INVALID,
                                     "Login response missing macaroon");
                return FALSE;
        }
@@ -760,7 +760,7 @@ gs_plugin_auth_login (GsPlugin *plugin, GsAuth *auth,
                if (!JSON_NODE_HOLDS_VALUE (node) && json_node_get_value_type (node) != G_TYPE_STRING) {
                        g_set_error_literal (error,
                                             GS_PLUGIN_ERROR,
-                                            GS_PLUGIN_ERROR_FAILED,
+                                            GS_PLUGIN_ERROR_AUTH_INVALID,
                                             "Macaroon discharge contains unexpected value");
                        return FALSE;
                }
diff --git a/src/plugins/gs-plugin-ubuntuone.c b/src/plugins/gs-plugin-ubuntuone.c
index 80f1ef9..c141947 100644
--- a/src/plugins/gs-plugin-ubuntuone.c
+++ b/src/plugins/gs-plugin-ubuntuone.c
@@ -165,7 +165,7 @@ gs_plugin_auth_login (GsPlugin *plugin, GsAuth *auth,
                } else {
                        g_set_error_literal (error,
                                             GS_PLUGIN_ERROR,
-                                            GS_PLUGIN_ERROR_FAILED,
+                                            GS_PLUGIN_ERROR_AUTH_INVALID,
                                             message);
                }
                return FALSE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]