You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -166,7 +169,7 @@ protected function flushCloudflareCdn(array $tags): void
166
169
$result = $cloudflareService->send(
167
170
'/zones/' . $identifier . '/purge_cache',
168
171
[
169
-
'tags' => [$tags],
172
+
'tags' => $tags,
170
173
],
171
174
'DELETE'
172
175
);
@@ -175,8 +178,15 @@ protected function flushCloudflareCdn(array $tags): void
175
178
$message = vsprintf('Cleared the cache on Cloudflare using Cache-Tag (domain: "%s")', [$zoneName, implode(LF, $result['errors'])]);
176
179
self::getLogger()->info($message);
177
180
} else {
178
-
$message = vsprintf('Failed to clear the cache on Cloudflare using Cache-Tag (domain: "%s"): %s', [$zoneName, implode(LF, $result['errors'] ?? [])]);
179
-
self::getLogger()->warning($message);
181
+
if (is_array($result['errors'])) {
182
+
foreach ($result['errors'] as$error) {
183
+
$message = vsprintf('Failed to clear the cache on Cloudflare using Cache-Tag (domain: "%s"): code %s, %s', [$zoneName, $error['code'], $error['message']]);
184
+
self::getLogger()->warning($message);
185
+
}
186
+
} else {
187
+
$message = vsprintf('Failed to clear the cache on Cloudflare using Cache-Tag (domain: "%s")', [$zoneName]);
188
+
self::getLogger()->warning($message);
189
+
}
180
190
}
181
191
} catch (\RuntimeException$e) {
182
192
self::getLogger()->error($e->getMessage());
@@ -197,16 +207,16 @@ protected function flushCloudinaryCdn($publicId): void
0 commit comments