Skip to content

Commit

Permalink
Only return successful cached responses (#5349)
Browse files Browse the repository at this point in the history
  • Loading branch information
penalosa authored Mar 21, 2024
1 parent 11e2ff5 commit 820fd38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/new-kiwis-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cloudflare/prerelease-registry": patch
---

fix: Only return successful cached responses
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const getArtifactForWorkflowRun = async ({
const cache = caches.default;

const cachedResponse = await cache.match(cacheKey);
if (cachedResponse) return cachedResponse;
if (cachedResponse && cachedResponse.status === 200) return cachedResponse;

try {
const artifactsResponse = await gitHubFetch(
Expand Down

0 comments on commit 820fd38

Please sign in to comment.