Better handle errors #26
Merged
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.
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:
_is_dataflow_not_found_errorfunction 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)get_data_from_apito use_is_dataflow_not_found_errorfor 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:
1.3.4inpyproject.tomlto reflect the new changes. (pyproject.toml)1.3.4. (CHANGELOG.md)