phalcon/cphalcon · error · Phalcon\Mvc\Micro\Exceptions\ResponseHandlerNotCallable

Response handler is not callable or is not defined

Error message

Response handler is not callable or is not defined

What it means

Error "Response handler is not callable or is not defined" thrown in phalcon/cphalcon.

Source

Thrown at phalcon/Mvc/Micro.zep:711

                } else {
                    if returnedValue !== false {
                        throw e;
                    }
                }
            } else {
                if returnedValue !== false {
                    throw e;
                }
            }
        }

        /**
         * Check if a response handler is defined, else use default response
         * handler
         */
        if this->responseHandler {
            if unlikely !is_callable(this->responseHandler) {
                throw new ResponseHandlerNotCallable();
            }

            let returnedValue = call_user_func(this->responseHandler);
        } else {
            /**
             * Check if the returned value is a string and take it as response
             * body
             */
            if typeof returnedValue === "string" {
                let response = <ResponseInterface> container->getShared("response");

                if !response->isSent() {
                    response->setContent(returnedValue);
                    response->send();
                }
            }

            /**

View on GitHub (pinned to b7419de9cd)

When it happens

Trigger: Thrown at phalcon/Mvc/Micro.zep:711 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phalcon/cphalcon@b7419de9cd (2026-08-21). Data as JSON: /api/errors/415d097dd405055c. Report an issue: GitHub.