{"record":{"id":"b2e7b656585fabf6","repo":"slimphp/Slim","slug":"s-could-not-instantiate-a-decorated-server-reques","errorCode":null,"errorMessage":"%s could not instantiate a decorated server request.","messagePattern":"(.+?) could not instantiate a decorated server request\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"Slim/Factory/Psr17/SlimHttpServerRequestCreator.php","lineNumber":46,"sourceCode":"    }\n\n    /**\n     * {@inheritdoc}\n     */\n    public function createServerRequestFromGlobals(): ServerRequestInterface\n    {\n        if (!static::isServerRequestDecoratorAvailable()) {\n            throw new RuntimeException('The Slim-Http ServerRequest decorator is not available.');\n        }\n\n        $request = $this->serverRequestCreator->createServerRequestFromGlobals();\n\n        if (\n            !((\n                $decoratedServerRequest = new static::$serverRequestDecoratorClass($request)\n                ) instanceof ServerRequestInterface)\n        ) {\n            throw new RuntimeException(get_called_class() . ' could not instantiate a decorated server request.');\n        }\n\n        return $decoratedServerRequest;\n    }\n\n    public static function isServerRequestDecoratorAvailable(): bool\n    {\n        return class_exists(static::$serverRequestDecoratorClass);\n    }\n}\n","sourceCodeStart":28,"sourceCodeEnd":57,"githubUrl":"https://github.com/slimphp/Slim/blob/80900fb39cafce3ae53b18a2c4f642a122f03095/Slim/Factory/Psr17/SlimHttpServerRequestCreator.php#L28-L57","documentation":"Error \"%s could not instantiate a decorated server request.\" thrown in slimphp/Slim.","triggerScenarios":"Thrown at Slim/Factory/Psr17/SlimHttpServerRequestCreator.php:46 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":"80900fb39cafce3ae53b18a2c4f642a122f03095","analyzedAt":"2026-08-21T01:41:09.580Z","schemaVersion":2},"datasetVersion":"2026-08-21T03:17:12.404Z"}