From b4bec57aa93fa1e8bd04938be7fafdffca420226 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Mon, 9 Aug 2010 15:07:00 +0200 Subject: [PATCH] Bubble up the error message from the server. --- kronolith/lib/Driver/Ical.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kronolith/lib/Driver/Ical.php b/kronolith/lib/Driver/Ical.php index 87b3386ff..030b42da1 100644 --- a/kronolith/lib/Driver/Ical.php +++ b/kronolith/lib/Driver/Ical.php @@ -386,6 +386,11 @@ class Kronolith_Driver_Ical extends Kronolith_Driver Horde::logMessage(sprintf('Failed to retrieve remote calendar: url = "%s", status = %s', $url, $response->code), 'INFO'); $error = sprintf(_("Could not open %s."), $url); + $body = $response->getBody(); + if ($body) { + $error .= ' ' . _("This is what the server said:") + . ' ' . Horde_String::truncate($body); + } if ($cache) { $cacheOb->set($signature, serialize($error)); } -- 2.11.0