nextcloud/server · error · BadRequestException
Parameters missing in order to complete the request. Missing
Error message
Parameters missing in order to complete the request. Missing Parameters: calendarUrl
What it means
OCP\Federation\Exceptions\BadRequestException thrown by CalendarFederationProvider::handleSyncCalendarNotification() when the SYNC_CALENDAR notification lacks 'calendarUrl' (CalendarFederationNotifier::PROP_SYNC_CALENDAR_CALENDAR_URL) or sends it empty. The calendarUrl is the remote calendar's URL used together with shareWith and sharedSecret in FederatedCalendarMapper::findByRemoteUrl(), so an empty value cannot locate the accepted share.
Source
Thrown at apps/dav/lib/CalDAV/Federation/CalendarFederationProvider.php:212
public function getSupportedShareTypes(): array {
return [self::USER_SHARE_TYPE];
}
/**
* @throws BadRequestException If notification props are missing.
* @throws ShareNotFound If the notification is not related to a known share.
*/
private function handleSyncCalendarNotification(array $notification): array {
$sharedSecret = $notification['sharedSecret'];
$shareWithRaw = $notification[CalendarFederationNotifier::PROP_SYNC_CALENDAR_SHARE_WITH] ?? null;
$calendarUrl = $notification[CalendarFederationNotifier::PROP_SYNC_CALENDAR_CALENDAR_URL] ?? null;
if ($shareWithRaw === null || $shareWithRaw === '') {
throw new BadRequestException([CalendarFederationNotifier::PROP_SYNC_CALENDAR_SHARE_WITH]);
}
if ($calendarUrl === null || $calendarUrl === '') {
throw new BadRequestException([CalendarFederationNotifier::PROP_SYNC_CALENDAR_CALENDAR_URL]);
}
try {
$shareWith = $this->cloudIdManager->resolveCloudId($shareWithRaw);
} catch (\InvalidArgumentException $e) {
throw new ShareNotFound('Invalid sharee cloud id');
}
$calendars = $this->federatedCalendarMapper->findByRemoteUrl(
$calendarUrl,
'principals/users/' . $shareWith->getUser(),
$sharedSecret,
FederatedCalendarEntity::STATE_ACCEPTED,
);
if (empty($calendars)) {
throw new ShareNotFound('Calendar is not shared with the sharee');
}
View on GitHub (pinned to ecdeb153ff)
Solutions
- Include a non-empty 'calendarUrl' in the SYNC_CALENDAR notification payload, matching the URL the calendar was originally shared with.
- Reuse CalendarFederationNotifier to construct the notification so props cannot be dropped.
- Validate the outbound payload against the notifier's prop constants before sending.
Example fix
// before $notification = ['sharedSecret' => $secret, 'shareWith' => $cloudId]; // after $notification = [ 'sharedSecret' => $secret, 'shareWith' => $cloudId, 'calendarUrl' => $remoteCalendarUrl, // CalendarFederationNotifier::PROP_SYNC_CALENDAR_CALENDAR_URL ];
Defensive patterns
Strategy: validation
Validate before calling
use OCA\DAV\CalDAV\Federation\CalendarFederationNotifier;
$notification[CalendarFederationNotifier::PROP_SYNC_CALENDAR_CALENDAR_URL] ??= null;
if (empty($notification[CalendarFederationNotifier::PROP_SYNC_CALENDAR_CALENDAR_URL])) {
throw new \InvalidArgumentException('calendarUrl is required for SYNC_CALENDAR notifications');
} Try / catch
try {
$provider->notificationReceived('SYNC_CALENDAR', 'calendar', $notification);
} catch (\OCP\Federation\Exceptions\BadRequestException $e) {
// getReturnMessage() shows 'calendarUrl' missing; populate it and resend
} Prevention
- Reuse the exact remote calendar URL from share creation in sync notifications.
- Centralize notification assembly so props are never dropped by refactors.
When it happens
Trigger: POSTing a 'SYNC_CALENDAR' federation notification without the 'calendarUrl' key or with an empty string; partial payloads from custom notification senders.
Common situations: Custom sync clients omitting the url prop; refactors that renamed the array key; notification payloads truncated by size limits; tests with incomplete fixtures.
Related errors
- Parameters missing in order to complete the request. Missing
- Parameters missing in order to complete the request. Missing
- Invalid sharee cloud id
- Calendar is not shared with the sharee
- Could not create new calendar event: {message}
AI-assisted analysis of nextcloud/server@ecdeb153ff (2026-08-17).
Data as JSON: /api/errors/c6d66d2372bf3ca2.
Report an issue: GitHub.