summaryrefslogtreecommitdiffstats
path: root/lib/Utils
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-06-17 12:34:56 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-06-17 12:34:56 +0200
commitc68353314b7bf0d559fb832bda1ceb55b16837fd (patch)
tree406d03c041390450edff4984b5012933abe80e12 /lib/Utils
parentb5219ba3dd15f990f9abffc8e81f1cdd3a908854 (diff)
downloadabrt-c68353314b7bf0d559fb832bda1ceb55b16837fd.tar.gz
abrt-c68353314b7bf0d559fb832bda1ceb55b16837fd.tar.xz
abrt-c68353314b7bf0d559fb832bda1ceb55b16837fd.zip
abrt_rh_support: handle 404 errors better
Also remove unused class memeber in CCpp analyser Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib/Utils')
-rw-r--r--lib/Utils/abrt_rh_support.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/Utils/abrt_rh_support.cpp b/lib/Utils/abrt_rh_support.cpp
index 5ff75652..3a14850b 100644
--- a/lib/Utils/abrt_rh_support.cpp
+++ b/lib/Utils/abrt_rh_support.cpp
@@ -396,9 +396,18 @@ send_report_to_new_case(const char* baseURL,
free_abrt_post_state(case_state);
goto redirect_case;
}
- /* fall through */
+ goto bad_resp_code;
+
+ case 404:
+ /* Not strictly necessary, but makes this typical error less cryptic:
+ * instead of returning html-encoded body, we show short concise message,
+ * and show offending URL (typos in which is a typical cause) */
+ retval = xasprintf("error in case creation, "
+ "HTTP code: 404 (Not found), URL:'%s'", case_url.c_str());
+ break;
default:
+ bad_resp_code:
errmsg = case_state->curl_error_msg;
if (errmsg)
retval = xasprintf("error in case creation: %s", errmsg);
@@ -408,7 +417,8 @@ send_report_to_new_case(const char* baseURL,
if ((!errmsg || !errmsg[0]) && case_state->body && case_state->body[0])
errmsg = case_state->body;
if (errmsg)
- retval = xasprintf("error in case creation, server says: '%s'", errmsg);
+ retval = xasprintf("error in case creation, HTTP code: %d, server says: '%s'",
+ case_state->http_resp_code, errmsg);
else
retval = xasprintf("error in case creation, HTTP code: %d",
case_state->http_resp_code);