{"record":{"id":"be1f0ef4280645c0","repo":"yiisoft/yii2","slug":"unknown-command-route","errorCode":null,"errorMessage":"Unknown command \"$route\".","messagePattern":"Unknown command \"\\$route\"\\.","errorType":"console","errorClass":"yii\\console\\UnknownCommandException","httpStatus":null,"severity":"error","filePath":"framework/console/Application.php","lineNumber":184,"sourceCode":"     * code should be used:\n     *\n     * ```\n     * \\Yii::$app->runAction('controller/test', ['option' => 'value', $a, $b]);\n     * ```\n     *\n     * @param string $route the route that specifies the action.\n     * @param array $params the parameters to be passed to the action\n     * @return int|Response|null the result of the action. This can be either an exit code or Response object.\n     * Exit code 0 means normal, and other values mean abnormal. Exit code of `null` is treated as `0` as well.\n     * @throws Exception if the route is invalid\n     */\n    public function runAction($route, $params = [])\n    {\n        try {\n            $res = parent::runAction($route, $params);\n            return is_object($res) ? $res : (int) $res;\n        } catch (InvalidRouteException $e) {\n            throw new UnknownCommandException($route, $this, 0, $e);\n        }\n    }\n\n    /**\n     * Returns the configuration of the built-in commands.\n     * @return array the configuration of the built-in commands.\n     */\n    public function coreCommands()\n    {\n        return [\n            'asset' => 'yii\\console\\controllers\\AssetController',\n            'cache' => 'yii\\console\\controllers\\CacheController',\n            'fixture' => 'yii\\console\\controllers\\FixtureController',\n            'help' => 'yii\\console\\controllers\\HelpController',\n            'message' => 'yii\\console\\controllers\\MessageController',\n            'migrate' => 'yii\\console\\controllers\\MigrateController',\n            'serve' => 'yii\\console\\controllers\\ServeController',\n        ];","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/yiisoft/yii2/blob/66f00d18a29b520f85e8e8f1e32d1e7e7b556cac/framework/console/Application.php#L166-L202","documentation":"Error \"Unknown command \"$route\".\" thrown in yiisoft/yii2.","triggerScenarios":"Thrown at framework/console/Application.php:184 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":"66f00d18a29b520f85e8e8f1e32d1e7e7b556cac","analyzedAt":"2026-08-17T05:17:23.470Z","schemaVersion":2},"datasetVersion":"2026-08-17T09:17:11.063Z"}