Repository navigation
fix: raise HTTPError on HTTP 5xx instead of returning an empty list - #92
Merged
Merged
Conversation
Server errors such as 504s were swallowed and indistinguishable from an empty result. 4xx behaviour is unchanged. Refs #71 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| Secrets | View in Orca |
lwoodblake
approved these changes
Oct 20, 2026
lwoodblake
left a comment
Contributor
There was a problem hiding this comment.
This fixes issue #71 and tests pass. Approve.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #71
Problem
get_resourceswallowed every non-200 response and returned[], so transient server errors (e.g. 504s during bulk loads) were indistinguishable from a legitimately empty result and data was silently dropped.Change
resp.raise_for_status(), raisingrequests.HTTPErrorso callers can catch and retry.[]), since e.g. a 404 can mean "no data yet / no 360 frames".HTTPErrorand falls back to the hardcodedVERSIONS.tests/statsbombpy_test/test_api_client.py.Not included: built-in retry logic; callers can add their own around the raised error.
Notes
Behaviour change: code that relied on a 5xx quietly returning an empty result will now get an exception. The 16 failures in
test_sb.pyalso occur on cleanmaster(they need network/credentials).🤖 Generated with Claude Code