Skip to content

[6.x] Handle empty Marketplace client responses - #15654

Merged
jasonvarga merged 2 commits into
6.xfrom
fix-marketplace-lock-timeout
Oct 15, 2026
Merged

jasonvarga merged 2 commits into
6.xfrom
fix-marketplace-lock-timeout

Conversation

@joshuablum

Copy link
Copy Markdown
Member

When the Marketplace client can't acquire its lock within 5 seconds (another request is already fetching), it returns the cached value, or null if there isn't one. Marketplace::packages() and themes() then accessed $response['data'] on null, which throws an ErrorException and fails the request.

This treats a null response like a failed request: an empty collection, cached for 5 minutes, the same way releases() already handles it.

Complements #15591, which covers the requests that time out or can't connect.

joshuablum and others added 2 commits October 15, 2026 15:50
When the Marketplace client can't acquire its lock in time, it returns
null. packages() and themes() then accessed an array offset on null,
causing an ErrorException. Treat it like a failed request instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A null response means the client couldn't get its lock while another request was fetching. Caching the fallback for 5 minutes could also discard the real data that request is about to cache, so retry on the next request instead. Request failures are still cached for 5 minutes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jasonvarga
jasonvarga enabled auto-merge (squash) October 15, 2026 15:16
@jasonvarga
jasonvarga merged commit a8d142c into 6.x Oct 15, 2026
64 checks passed
@jasonvarga
jasonvarga deleted the fix-marketplace-lock-timeout branch October 15, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants