diff options
author | Guido Günther <agx@sigxcpu.org> | 2015-10-16 19:27:04 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2015-10-16 19:28:45 +0200 |
commit | f751493dca56c143dfd220ecff016005fbaeefe6 (patch) | |
tree | 224a0717f3b377a27e724f8c3c75f860cb6860c0 | |
parent | 5c5fce352ffcde33d8daf9d76805621afe6ce685 (diff) |
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.
-rw-r--r-- | libplanfahr/providers/hafas-bin6.c | 6 |
1 files changed, 4 insertions, 2 deletions
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; } |