Skip to content

Conversation

@jm-rivera
Copy link
Collaborator

This pull request improves the robustness of the dataflow version fallback logic in the ODA Reader package. The main enhancement is that API error detection now checks the response content for error patterns, regardless of HTTP status code, allowing for more reliable handling of cases where error messages are returned with non-404 status codes.

Dataflow version fallback robustness:

  • Added the _is_dataflow_not_found_error function to detect dataflow/version not found errors in API responses by matching known error patterns and checking for invalid CSV responses. (src/oda_reader/common.py)
  • Updated the version fallback logic in get_data_from_api to use _is_dataflow_not_found_error for error detection, triggering retries regardless of HTTP status code and improving error message reporting after maximum retries. (src/oda_reader/common.py)

Release and metadata updates:

  • Bumped the package version to 1.3.4 in pyproject.toml to reflect the new changes. (pyproject.toml)
  • Documented the improved dataflow fallback logic in the changelog for version 1.3.4. (CHANGELOG.md)

@jm-rivera jm-rivera merged commit c18148b into main Dec 19, 2025
0 of 9 checks passed
@jm-rivera jm-rivera deleted the fix-error-message branch December 19, 2025 14:10
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