[gnome-software] odrs: Generate an error when fail to submit review



commit d51a0ceb408dc547375200a5677add117de52cf4
Author: Robert Ancell <robert ancell canonical com>
Date:   Wed Nov 21 12:28:44 2018 +1300

    odrs: Generate an error when fail to submit review

 plugins/odrs/gs-plugin-odrs.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/plugins/odrs/gs-plugin-odrs.c b/plugins/odrs/gs-plugin-odrs.c
index 4031264d..d1340985 100644
--- a/plugins/odrs/gs-plugin-odrs.c
+++ b/plugins/odrs/gs-plugin-odrs.c
@@ -467,6 +467,11 @@ gs_plugin_odrs_json_post (SoupSession *session,
        if (status_code != SOUP_STATUS_OK) {
                g_warning ("Failed to set rating on odrs: %s",
                           soup_status_get_phrase (status_code));
+               g_set_error (error,
+                             GS_PLUGIN_ERROR,
+                             GS_PLUGIN_ERROR_FAILED,
+                             "Failed to set submit review to ODRS: %s", soup_status_get_phrase 
(status_code));
+               return FALSE;
        }
 
        /* process returned JSON */


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