permission check

This commit is contained in:
2026-08-25 21:24:35 +03:30
parent ffaded6fef
commit ce8f5ca482
+8 -1
View File
@@ -491,7 +491,14 @@ class ZaarboxPriceService
/** @param array<int, array<string, mixed>> $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(),
]);
}
}
/**