{"record":{"id":"9ac58e82674035f4","repo":"nextcloud/server","slug":"class-msg-9ac58e","errorCode":null,"errorMessage":"$class: $msg","messagePattern":"\\$class: \\$msg","errorType":"exception","errorClass":"Sabre\\DAV\\Exception\\ServiceUnavailable","httpStatus":503,"severity":"error","filePath":"apps/dav/lib/Connector/Sabre/PublicAuth.php","lineNumber":99,"sourceCode":"\n\t\t\treturn $this->checkToken();\n\t\t} catch (NotAuthenticated|MaxDelayReached $e) {\n\t\t\t$this->throttler->registerAttempt(self::BRUTEFORCE_ACTION, $this->request->getRemoteAddress());\n\t\t\tthrow $e;\n\t\t} catch (PreconditionFailed $e) {\n\t\t\t$response->setHeader(\n\t\t\t\t'Location',\n\t\t\t\t$this->urlGenerator->linkToRoute(\n\t\t\t\t\t'files_sharing.share.showShare',\n\t\t\t\t\t[ 'token' => $this->getToken() ],\n\t\t\t\t),\n\t\t\t);\n\t\t\tthrow $e;\n\t\t} catch (\\Exception $e) {\n\t\t\t$class = get_class($e);\n\t\t\t$msg = $e->getMessage();\n\t\t\t$this->logger->error($e->getMessage(), ['exception' => $e]);\n\t\t\tthrow new ServiceUnavailable(\"$class: $msg\");\n\t\t}\n\t}\n\n\t/**\n\t * Extract token from request url\n\t * @throws NotFound\n\t */\n\tprivate function getToken(): string {\n\t\t$path = $this->request->getPathInfo() ?: '';\n\t\t// ['', 'dav', 'files', 'token']\n\t\t$splittedPath = explode('/', $path);\n\n\t\tif (count($splittedPath) < 4 || $splittedPath[3] === '') {\n\t\t\tthrow new NotFound();\n\t\t}\n\n\t\treturn $splittedPath[3];\n\t}","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/nextcloud/server/blob/ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3/apps/dav/lib/Connector/Sabre/PublicAuth.php#L81-L117","documentation":"Error \"$class: $msg\" thrown in nextcloud/server.","triggerScenarios":"Thrown at apps/dav/lib/Connector/Sabre/PublicAuth.php:99 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":"ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3","analyzedAt":"2026-08-17T01:36:13.386Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}