diff --git a/app/Services/ZaarboxPriceService.php b/app/Services/ZaarboxPriceService.php index 0dacc79..e7ef07f 100644 --- a/app/Services/ZaarboxPriceService.php +++ b/app/Services/ZaarboxPriceService.php @@ -491,7 +491,14 @@ class ZaarboxPriceService /** @param array> $prices */ public function storePriceListCache(array $prices): void { - Cache::put(self::PRICE_LIST_CACHE_KEY, $prices, now()->addSeconds(self::PRICE_LIST_CACHE_SECONDS)); + try { + Cache::put(self::PRICE_LIST_CACHE_KEY, $prices, now()->addSeconds(self::PRICE_LIST_CACHE_SECONDS)); + } catch (\Throwable $e) { + // مالکیت اشتباه storage (مثلاً root بعد از artisan) → Permission denied لحظه‌ای؛ API نباید ۵۰۰ شود + Log::warning('Zaarbox price list cache write failed', [ + 'error' => $e->getMessage(), + ]); + } } /**