{"record":{"id":"164effbe742c5f10","repo":"nextcloud/server","slug":"parameters-missing-in-order-to-complete-the-reques","errorCode":null,"errorMessage":"Parameters missing in order to complete the request. Missing Parameters: providerId","messagePattern":"Parameters missing in order to complete the request\\. Missing Parameters: providerId","errorType":"validation","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"apps/dav/lib/CalDAV/Federation/CalendarFederationProvider.php","lineNumber":179,"sourceCode":"\t\t\t]);\n\t\t} elseif ($this->invitationService->shouldAutoAccept($share->getOwner(), $calendar->getRemoteUrl())) {\n\t\t\t$this->invitationService->accept($calendar);\n\t\t} elseif ($isNew) {\n\t\t\t// A re-shared pending calendar keeps its original invitation\n\t\t\t$this->invitationService->notifyAboutNewShare($calendar);\n\t\t}\n\n\t\treturn (string)$calendar->getId();\n\t}\n\n\t#[\\Override]\n\tpublic function notificationReceived(\n\t\t$notificationType,\n\t\t$providerId,\n\t\tarray $notification,\n\t): array {\n\t\tif ($providerId !== self::PROVIDER_ID) {\n\t\t\tthrow new BadRequestException(['providerId']);\n\t\t}\n\n\t\tswitch ($notificationType) {\n\t\t\tcase CalendarFederationNotifier::NOTIFICATION_SYNC_CALENDAR:\n\t\t\t\treturn $this->handleSyncCalendarNotification($notification);\n\t\t\tdefault:\n\t\t\t\treturn [];\n\t\t}\n\t}\n\n\t/**\n\t * @return string[]\n\t */\n\t#[\\Override]\n\tpublic function getSupportedShareTypes(): array {\n\t\treturn [self::USER_SHARE_TYPE];\n\t}\n","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/nextcloud/server/blob/ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3/apps/dav/lib/CalDAV/Federation/CalendarFederationProvider.php#L161-L197","documentation":"OCP\\Federation\\Exceptions\\BadRequestException thrown by CalendarFederationProvider::notificationReceived() when the $providerId argument differs from PROVIDER_ID ('calendar'). The exception constructor turns the parameter list into 'Parameters missing in order to complete the request. Missing Parameters: providerId' and exposes getReturnMessage() for the OCM-style validation error body. In the normal OCS routing the provider id already selected this provider, so seeing it means a direct/mismatched call.","triggerScenarios":"Invoking notificationReceived() directly (tests, custom federation code) with a providerId other than 'calendar'; POSTing to the cloud federation notifications endpoint with a providerId that does not equal CalendarFederationProvider::PROVIDER_ID but reaching this provider anyway.","commonSituations":"Unit tests that pass a placeholder providerId; copy-pasted provider wiring where the registered id and the dispatched id diverge; client integrations sending providerId 'calendarFederation' or 'calendars' instead of 'calendar'.","solutions":["Always pass providerId exactly 'calendar' (CalendarFederationProvider::PROVIDER_ID) when calling notificationReceived().","When POSTing to the cloud federation API notification endpoint, set the providerId request parameter to 'calendar'.","In tests, derive the id from the constant instead of a string literal."],"exampleFix":"// before\n$provider->notificationReceived('SYNC_CALENDAR', 'calendars', $notification);\n\n// after\n$provider->notificationReceived(\n\t\\OCA\\DAV\\CalDAV\\Federation\\CalendarFederationNotifier::NOTIFICATION_SYNC_CALENDAR,\n\t\\OCA\\DAV\\CalDAV\\Federation\\CalendarFederationProvider::PROVIDER_ID,\n\t$notification,\n);","handlingStrategy":"validation","validationCode":"use OCA\\DAV\\CalDAV\\Federation\\CalendarFederationProvider;\nif ($providerId !== CalendarFederationProvider::PROVIDER_ID) {\n    $providerId = CalendarFederationProvider::PROVIDER_ID; // 'calendar'\n}\n$provider->notificationReceived($notificationType, $providerId, $notification);","typeGuard":null,"tryCatchPattern":"try {\n    $provider->notificationReceived($type, $providerId, $notification);\n} catch (\\OCP\\Federation\\Exceptions\\BadRequestException $e) {\n    // getReturnMessage() lists the offending parameter; fix providerId and re-send\n}","preventionTips":["Reference PROVIDER_ID constants instead of string literals for provider ids.","In tests, seed providerId from the same constant used at registration."],"tags":["caldav","calendar","federation","bad-request","provider-id","notification"],"backgroundTag":"request-parameter-missing","analyzedSha":"ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3","analyzedAt":"2026-08-17T01:36:13.386Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}