Leantime/leantime · error · Leantime\Core\Exceptions\MissingParameterException
-32602
-32602
Error message
userHash and calendar hash are required
What it means
Error "userHash and calendar hash are required" thrown in Leantime/leantime.
Source
Thrown at app/Domain/Calendar/Services/Calendar.php:395
/**
* Retrieves iCal calendar by user hash and calendar hash.
*
* @param string $userHash The hash of the user.
* @param string $calHash The hash of the calendar.
* @return IcalCalendar The iCal calendar generated from the calendar events.
*
* @throws MissingParameterException If either user hash or calendar hash is empty.
*
* Not @api: served by the PUBLIC, hash-authenticated /calendar/ical route (no session). The
* userHash+calHash secrets ARE the credential; exposing it over JSON-RPC would let a caller
* brute-force feeds. The Ical controller calls it internally.
*/
public function getIcalByHash(string $userHash, string $calHash): IcalCalendar
{
if (empty($userHash) || empty($calHash)) {
throw new MissingParameterException('userHash and calendar hash are required');
}
$calendarEvents = $this->calendarRepo->getCalendarBySecretHash($userHash, $calHash);
if (! $calendarEvents) {
throw new \Exception('Calendar could not be retrieved');
}
$eventObjects = [];
// Create array of event objects for ical generator
foreach ($calendarEvents as $event) {
try {
$description = str_replace("\r\n", '\\n', strip_tags($event['description']));
$currentEvent = IcalEvent::create()
->image(BASE_URL.'/dist/images/favicon.png', 'image/png', Display::badge())View on GitHub (pinned to 9a9f49f100)
When it happens
Trigger: Thrown at app/Domain/Calendar/Services/Calendar.php:395 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Leantime/leantime@9a9f49f100 (2026-08-21).
Data as JSON: /api/errors/ea7f6450888eba2e.
Report an issue: GitHub.