[gnome-keyring/wip/gdbus: 28/31] dbus-objects: return correct DBus error codes



commit c301ab75e46f14ede13de4d84128974794626c5f
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Nov 14 13:44:36 2014 -0800

    dbus-objects: return correct DBus error codes

 daemon/dbus/gkd-secret-objects.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/daemon/dbus/gkd-secret-objects.c b/daemon/dbus/gkd-secret-objects.c
index 495605a..8c33b97 100644
--- a/daemon/dbus/gkd-secret-objects.c
+++ b/daemon/dbus/gkd-secret-objects.c
@@ -128,7 +128,7 @@ object_property_set (GkdSecretObjects *objects,
        /* What type of property is it? */
        if (!gkd_secret_property_get_type (prop_name, &attr_type)) {
                g_set_error (error_out, G_DBUS_ERROR,
-                            G_DBUS_ERROR_FAILED,
+                            G_DBUS_ERROR_UNKNOWN_PROPERTY,
                             "Object does not have the '%s' property",
                             prop_name);
                return FALSE;
@@ -138,7 +138,7 @@ object_property_set (GkdSecretObjects *objects,
        if (!gkd_secret_property_parse_variant (value, prop_name, &builder)) {
                gck_builder_clear (&builder);
                 g_set_error (error_out, G_DBUS_ERROR,
-                             G_DBUS_ERROR_FAILED,
+                             G_DBUS_ERROR_INVALID_ARGS,
                              "The property type or value was invalid: %s",
                              prop_name);
                return FALSE;
@@ -177,7 +177,7 @@ object_property_get (GkdSecretObjects *objects,
 
        if (!gkd_secret_property_get_type (prop_name, &attr.type)) {
                g_set_error (error_out, G_DBUS_ERROR,
-                            G_DBUS_ERROR_FAILED,
+                            G_DBUS_ERROR_UNKNOWN_PROPERTY,
                             "Object does not have the '%s' property",
                             prop_name);
                return NULL;


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