{"record":{"id":"a16f89cfc7c67eed","repo":"phalcon/cphalcon","slug":"before-handler-is-not-callable","errorCode":null,"errorMessage":"'before' handler is not callable","messagePattern":"'before' handler is not callable","errorType":"exception","errorClass":"Phalcon\\Mvc\\Micro\\Exceptions\\HandlerNotCallable","httpStatus":null,"severity":"error","filePath":"phalcon/Mvc/Micro.zep","lineNumber":427,"sourceCode":"\n                    let handler = this->activeHandler;\n                }\n\n                let beforeHandlers = this->beforeHandlers;\n                let this->stopped = false;\n\n                /**\n                 * Calls the before handlers\n                 */\n                for before in beforeHandlers {\n                    if typeof before === \"object\" && before instanceof MiddlewareInterface {\n                        /**\n                         * Call the middleware\n                         */\n                        let status = before->call(this);\n                    } else {\n                        if unlikely !is_callable(before) {\n                            throw new HandlerNotCallable(\"before\");\n                        }\n\n                        /**\n                         * Call the before handler\n                         */\n                        let status = call_user_func(before);\n                    }\n\n                    /**\n                     * Return the status if the middleware was stopped\n                     */\n                    if this->stopped {\n                        return status;\n                    }\n                }\n\n                let params = router->getParams();\n","sourceCodeStart":409,"sourceCodeEnd":445,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Mvc/Micro.zep#L409-L445","documentation":"Error \"'before' handler is not callable\" thrown in phalcon/cphalcon.","triggerScenarios":"Thrown at phalcon/Mvc/Micro.zep:427 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":"b7419de9cd0a8a3f48441ead84c9f8415d463e25","analyzedAt":"2026-08-21T06:21:18.811Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}