nextcloud/server · error · Sabre\DAV\Exception\BadRequest

Missing filter-rule block in request

Error message

Missing filter-rule block in request

What it means

Error "Missing filter-rule block in request" thrown in nextcloud/server.

Source

Thrown at apps/dav/lib/Connector/Sabre/FilesReportPlugin.php:150

			} elseif ($name === '{DAV:}prop') {
				// propfind properties
				foreach ($reportProps['value'] as $propVal) {
					$requestedProps[] = $propVal['name'];
				}
			} elseif ($name === '{DAV:}limit') {
				foreach ($reportProps['value'] as $propVal) {
					if ($propVal['name'] === '{DAV:}nresults') {
						$limit = (int)$propVal['value'];
					} elseif ($propVal['name'] === $ncns . 'firstresult') {
						$offset = (int)$propVal['value'];
					}
				}
			}
		}

		if (empty($filterRules)) {
			// an empty filter would return all existing files which would be slow
			throw new BadRequest('Missing filter-rule block in request');
		}

		// gather all file ids matching filter
		try {
			$resultFileIds = $this->processFilterRulesForFileIDs($filterRules);
			// no logic in circles and favorites for paging, we always have all results, and slice later on
			$resultFileIds = array_slice($resultFileIds, $offset ?? 0, $limit ?? null);
			// fetching nodes has paging on DB level – therefore we cannot mix and slice the results, similar
			// to user backends. I.e. the final result may return more results than requested.
			$resultNodes = $this->processFilterRulesForFileNodes($filterRules, $limit ?? null, $offset ?? null);
		} catch (TagNotFoundException $e) {
			throw new PreconditionFailed('Cannot filter by non-existing tag');
		}

		$results = [];
		foreach ($resultNodes as $entry) {
			if ($entry) {
				$results[] = $this->wrapNode($entry);

View on GitHub (pinned to ecdeb153ff)

When it happens

Trigger: Thrown at apps/dav/lib/Connector/Sabre/FilesReportPlugin.php:150 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of nextcloud/server@ecdeb153ff (2026-08-17). Data as JSON: /api/errors/47959aa146305da6. Report an issue: GitHub.