[gnome-online-accounts/wip/rishi/facebook: 2/4] lastfm: Log the details of parsing failures as WARNINGs



commit e813083678995a3c5e4464eb928150ac92580ab4
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Aug 2 18:00:14 2017 +0200

    lastfm: Log the details of parsing failures as WARNINGs

 src/goabackend/goalastfmprovider.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/goabackend/goalastfmprovider.c b/src/goabackend/goalastfmprovider.c
index 98b979c..412d5ba 100644
--- a/src/goabackend/goalastfmprovider.c
+++ b/src/goabackend/goalastfmprovider.c
@@ -225,6 +225,7 @@ lastfm_login_sync (GoaProvider                  *provider,
   json_obj = json_node_get_object (root);
   if (!json_object_has_member (json_obj, "session"))
     {
+      g_warning ("Did not find session in JSON data");
       g_set_error (error, GOA_ERROR, GOA_ERROR_FAILED, _("Could not parse response"));
       goto out;
     }
@@ -232,11 +233,13 @@ lastfm_login_sync (GoaProvider                  *provider,
   session_obj = json_node_get_object (json_object_get_member (json_obj, "session"));
   if (!json_object_has_member (session_obj, "name"))
     {
+      g_warning ("Did not find session.name in JSON data");
       g_set_error (error, GOA_ERROR, GOA_ERROR_FAILED, _("Could not parse response"));
       goto out;
     }
   if (!json_object_has_member (session_obj, "key"))
     {
+      g_warning ("Did not find session.key in JSON data");
       g_set_error (error, GOA_ERROR, GOA_ERROR_FAILED, _("Could not parse response"));
       goto out;
     }


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