[gnome-online-accounts/wip/rishi/facebook: 10/14] lastfm: Log the	details of parsing failures as WARNINGs
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gnome-online-accounts/wip/rishi/facebook: 10/14] lastfm: Log the	details of parsing failures as WARNINGs
- Date: Wed,  2 Aug 2017 18:59:58 +0000 (UTC)
commit 91d6e5323499d456a167d02ba29c879fe00f82e9
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]