{"record":{"id":"9033d538d77969fc","repo":"slimphp/Slim","slug":"middleware-s-does-not-exist","errorCode":null,"errorMessage":"Middleware %s does not exist","messagePattern":"Middleware (.+?) does not exist","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"Slim/MiddlewareDispatcher.php","lineNumber":210,"sourceCode":"                    $resolved = $this->middleware;\n                    $instance = null;\n                    $method = null;\n\n                    /** @psalm-suppress ArgumentTypeCoercion */\n                    // Check for Slim callable as `class:method`\n                    if (preg_match(CallableResolver::$callablePattern, $resolved, $matches)) {\n                        $resolved = $matches[1];\n                        $method = $matches[2];\n                    }\n\n                    if ($this->container && $this->container->has($resolved)) {\n                        $instance = $this->container->get($resolved);\n                        if ($instance instanceof MiddlewareInterface) {\n                            return $instance->process($request, $this->next);\n                        }\n                    } elseif (!function_exists($resolved)) {\n                        if (!class_exists($resolved)) {\n                            throw new RuntimeException(sprintf('Middleware %s does not exist', $resolved));\n                        }\n                        $instance = new $resolved($this->container);\n                    }\n\n                    if ($instance && $instance instanceof MiddlewareInterface) {\n                        return $instance->process($request, $this->next);\n                    }\n\n                    $callable = $instance ?? $resolved;\n                    if ($instance && $method) {\n                        $callable = [$instance, $method];\n                    }\n\n                    if ($this->container && $callable instanceof Closure) {\n                        $callable = $callable->bindTo($this->container);\n                    }\n                }\n","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/slimphp/Slim/blob/80900fb39cafce3ae53b18a2c4f642a122f03095/Slim/MiddlewareDispatcher.php#L192-L228","documentation":"Error \"Middleware %s does not exist\" thrown in slimphp/Slim.","triggerScenarios":"Thrown at Slim/MiddlewareDispatcher.php:210 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"}