From f751493dca56c143dfd220ecff016005fbaeefe6 Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Fri, 16 Oct 2015 19:27:04 +0200 Subject: Use soup_status_get_phrase Although the docs advice against it we're not handling translations at the moment so let's have more detailes status information. --- libplanfahr/providers/hafas-bin6.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libplanfahr') diff --git a/libplanfahr/providers/hafas-bin6.c b/libplanfahr/providers/hafas-bin6.c index 6d50c9d..6d6587b 100644 --- a/libplanfahr/providers/hafas-bin6.c +++ b/libplanfahr/providers/hafas-bin6.c @@ -224,7 +224,8 @@ got_locs (SoupSession *session, SoupMessage *msg, gpointer user_data) g_set_error (&err, LPF_PROVIDER_ERROR, LPF_PROVIDER_ERROR_REQUEST_FAILED, - "HTTP request failed: %d", msg->status_code); + "Cannot get location: %s", + soup_status_get_phrase(msg->status_code)); goto out; } @@ -634,7 +635,8 @@ got_trips (SoupSession *session, SoupMessage *msg, gpointer user_data) g_set_error (&err, LPF_PROVIDER_ERROR, LPF_PROVIDER_ERROR_REQUEST_FAILED, - "HTTP request failed: %d", msg->status_code); + "Cannot get trips: %s", + soup_status_get_phrase(msg->status_code)); goto out; } -- cgit v1.2.3