{"record":{"id":"2f422563e5e5f3b7","repo":"unopim/unopim","slug":"channel-with-code-s-could-not-be-found","errorCode":null,"errorMessage":"Channel with code %s could not be found.","messagePattern":"Channel with code (.+?) could not be found\\.","errorType":"exception","errorClass":"ModelNotFoundException","httpStatus":404,"severity":"error","filePath":"packages/Webkul/AdminApi/src/ApiDataSource/ChannelDataSource.php","lineNumber":79,"sourceCode":"    public function getByCode(string $code)\n    {\n        $this->prepareForSingleData();\n\n        $requestedFilters = [\n            'code' => [\n                [\n                    'operator' => '=',\n                    'value'    => $code,\n                ],\n            ],\n        ];\n\n        $this->queryBuilder = $this->processRequestedFilters($requestedFilters);\n\n        $channel = $this->queryBuilder->first()?->toArray();\n\n        if (! $channel) {\n            throw new ModelNotFoundException(\n                sprintf('Channel with code %s could not be found.', (string) $code)\n            );\n        }\n\n        return [\n            'code'          => $channel['code'],\n            'labels'        => $this->getTranslations($channel),\n            'root_category' => $channel['root_category'] ? $channel['root_category']['code'] : null,\n            'locales'       => $this->getLocales($channel),\n            'currencies'    => $this->getCurrencies($channel),\n        ];\n    }\n\n    /**\n     * Get locales of the channel.\n     *\n     * @param  array  $channel  The channel data from the database.\n     * @return array An array of locales associated with the channel.","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/unopim/unopim/blob/c27a402253ed2bcee0f3eb16319fa7fc5eec5ffd/packages/Webkul/AdminApi/src/ApiDataSource/ChannelDataSource.php#L61-L97","documentation":"Error \"Channel with code %s could not be found.\" thrown in unopim/unopim.","triggerScenarios":"Thrown at packages/Webkul/AdminApi/src/ApiDataSource/ChannelDataSource.php:79 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":"c27a402253ed2bcee0f3eb16319fa7fc5eec5ffd","analyzedAt":"2026-08-21T04:19:34.141Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}