{"record":{"id":"c7043924d57f1157","repo":"unopim/unopim","slug":"product-with-sku-sku-could-not-be-found-c70439","errorCode":null,"errorMessage":"Product with sku \":sku\" could not be found","messagePattern":"Product with sku \":sku\" could not be found","errorType":"exception","errorClass":"ModelNotFoundException","httpStatus":404,"severity":"error","filePath":"packages/Webkul/AdminApi/src/Http/Controllers/API/Catalog/MediaFileController.php","lineNumber":471,"sourceCode":"        }\n\n        $product->values = $values;\n        $product->save();\n    }\n\n    /**\n     * Finds a product by its SKU and throws a ModelNotFoundException if not found.\n     *\n     * @param  string  $sku  The SKU of the product to be found.\n     * @return Product The found product.\n     *\n     * @throws ModelNotFoundException If the product is not found.\n     */\n    protected function findProductOr404(string $sku)\n    {\n        $product = $this->productRepository->findByField('sku', $sku)->first();\n        if (! $product) {\n            throw new ModelNotFoundException(\n                trans('admin::app.catalog.products.product-not-found', ['sku' => $sku])\n            );\n        }\n\n        return $product;\n    }\n}\n","sourceCodeStart":453,"sourceCodeEnd":479,"githubUrl":"https://github.com/unopim/unopim/blob/c27a402253ed2bcee0f3eb16319fa7fc5eec5ffd/packages/Webkul/AdminApi/src/Http/Controllers/API/Catalog/MediaFileController.php#L453-L479","documentation":"Error \"Product with sku \":sku\" could not be found\" thrown in unopim/unopim.","triggerScenarios":"Thrown at packages/Webkul/AdminApi/src/Http/Controllers/API/Catalog/MediaFileController.php:471 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"}