{"record":{"id":"e244ef794e6e9fc3","repo":"phalcon/cphalcon","slug":"there-are-no-handlers-to-mount","errorCode":null,"errorMessage":"There are no handlers to mount","messagePattern":"There are no handlers to mount","errorType":"exception","errorClass":"Phalcon\\Mvc\\Micro\\Exceptions\\NoHandlersToMount","httpStatus":null,"severity":"error","filePath":"phalcon/Mvc/Micro.zep","lineNumber":790,"sourceCode":"     */\n    public function mount(<CollectionInterface> collection) -> <static>\n    {\n        var mainHandler, handlers, lazyHandler, prefix, methods, pattern,\n            subHandler, realHandler, prefixedPattern, route, handler, name;\n\n        /**\n         * Get the main handler\n         */\n        let mainHandler = collection->getHandler();\n\n        if unlikely empty mainHandler {\n            throw new MissingCollectionMainHandler();\n        }\n\n        let handlers = collection->getHandlers();\n\n        if unlikely empty handlers {\n            throw new NoHandlersToMount();\n        }\n\n        /**\n         * Check if handler is lazy\n         */\n        if collection->isLazy() {\n            let lazyHandler = new LazyLoader(mainHandler);\n        } else {\n            let lazyHandler = mainHandler;\n        }\n\n        /**\n         * Get the main prefix for the collection\n         */\n        let prefix = collection->getPrefix();\n\n        for handler in handlers {\n            if unlikely typeof handler !== \"array\" {","sourceCodeStart":772,"sourceCodeEnd":808,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Mvc/Micro.zep#L772-L808","documentation":"Thrown by Micro::mount when the collection being mounted reports an empty handler list via getHandlers() (a companion guard also rejects an empty main handler). A CollectionInterface without handlers would register no routes, so the guard refuses to mount it; the input at fault is the Phalcon\\Mvc\\Micro\\Collection passed in, which was built without any get()/post()/... route definitions.","triggerScenarios":"Thrown at phalcon/Mvc/Micro.zep:790 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add handlers to the collection via collection->get/post/... before mounting","Skip mounting empty collections entirely"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b7419de9cd0a8a3f48441ead84c9f8415d463e25","analyzedAt":"2026-08-21T06:21:18.811Z","contentChangedAt":"2026-08-21T06:21:18.811Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}