{"record":{"id":"78d0a36ceffcf83b","repo":"unopim/unopim","slug":"translateproductvaluesjob-all-locales-failed-for","errorCode":null,"errorMessage":"TranslateProductValuesJob: all locales failed for {$product->sku} — {failed}","messagePattern":"TranslateProductValuesJob: all locales failed for (.+?) — (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"packages/Webkul/AiAgent/src/Jobs/TranslateProductValuesJob.php","lineNumber":161,"sourceCode":"\n                if ($applied === 0) {\n                    $failed[$targetLocale] = 'no valid fields in response';\n\n                    continue;\n                }\n\n                $succeeded[] = $targetLocale;\n            } catch (\\Throwable $e) {\n                $failed[$targetLocale] = $e->getMessage();\n                Log::error(\"TranslateProductValuesJob: {$targetLocale} failed for {$product->sku}: {$e->getMessage()}\");\n            }\n        }\n\n        if ($succeeded === []) {\n            // Nothing was translated. Surface it as a failure instead of the\n            // old silent \"completed\" so the queue retries and the operator\n            // can see something went wrong.\n            throw new \\RuntimeException(\n                \"TranslateProductValuesJob: all locales failed for {$product->sku} — \".json_encode($failed)\n            );\n        }\n\n        Log::info(sprintf(\n            'TranslateProductValuesJob: %s translated to %s%s',\n            $product->sku,\n            implode(', ', $succeeded),\n            $failed === [] ? '' : ' (failed: '.implode(', ', array_keys($failed)).')',\n        ));\n    }\n\n    /**\n     * Collect every active locale (across all channels) except the source.\n     *\n     * @param  iterable<object>  $allChannels\n     * @return array<int, string>\n     */","sourceCodeStart":143,"sourceCodeEnd":179,"githubUrl":"https://github.com/unopim/unopim/blob/c27a402253ed2bcee0f3eb16319fa7fc5eec5ffd/packages/Webkul/AiAgent/src/Jobs/TranslateProductValuesJob.php#L143-L179","documentation":"Error \"TranslateProductValuesJob: all locales failed for {$product->sku} — {failed}\" thrown in unopim/unopim.","triggerScenarios":"Thrown at packages/Webkul/AiAgent/src/Jobs/TranslateProductValuesJob.php:161 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"}