{"record":{"id":"688bf483bbb5e29f","repo":"Leantime/leantime","slug":"error-loading-ical-feed-e-getmessage","errorCode":null,"errorMessage":"Error loading iCal feed: '.$e->getMessage()","messagePattern":"Error loading iCal feed: '\\.\\$e->getMessage\\(\\)","errorType":"exception","errorClass":"\\Exception","httpStatus":null,"severity":"error","filePath":"app/Domain/Calendar/Services/Calendar.php","lineNumber":886,"sourceCode":"\n        $client = new \\GuzzleHttp\\Client;\n\n        try {\n            $response = $client->get($url, [\n                'allow_redirects' => OutboundUrlGuard::redirectOptions(),\n                'headers' => [\n                    'Accept' => 'text/calendar',\n                    'User-Agent' => 'Leantime Calendar Integration v'.$this->config->appVersion,\n                ],\n            ]);\n\n            if ($response->getStatusCode() == 200) {\n                return (string) $response->getBody();\n            }\n\n            throw new \\Exception('Failed to load iCal feed: HTTP '.$response->getStatusCode());\n        } catch (\\Exception $e) {\n            throw new \\Exception('Error loading iCal feed: '.$e->getMessage());\n        }\n    }\n\n    public function generateIcalHash()\n    {\n\n        if (empty(session('userdata.id'))) {\n            throw new \\Exception('Session id is not set.');\n        }\n\n        $uuid = Uuid::uuid4();\n        $icalHash = $uuid->toString();\n\n        $this->settingsRepo->saveSetting('usersettings.'.session('userdata.id').'.icalSecret', $icalHash);\n\n    }\n\n    /**","sourceCodeStart":868,"sourceCodeEnd":904,"githubUrl":"https://github.com/Leantime/leantime/blob/9a9f49f1008f4782b30f6723c54228f4f992e636/app/Domain/Calendar/Services/Calendar.php#L868-L904","documentation":"Error \"Error loading iCal feed: '.$e->getMessage()\" thrown in Leantime/leantime.","triggerScenarios":"Thrown at app/Domain/Calendar/Services/Calendar.php:886 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9a9f49f1008f4782b30f6723c54228f4f992e636","analyzedAt":"2026-08-21T02:37:38.966Z","schemaVersion":2},"datasetVersion":"2026-08-21T03:17:12.404Z"}