Bubble up the error message from the server.
authorJan Schneider <jan@horde.org>
Mon, 9 Aug 2010 13:07:00 +0000 (15:07 +0200)
committerJan Schneider <jan@horde.org>
Mon, 9 Aug 2010 13:30:53 +0000 (15:30 +0200)
kronolith/lib/Driver/Ical.php

index 87b3386..030b42d 100644 (file)
@@ -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));
             }