Skip to content

Harden currency response parsing - #52

Merged
wilsonfreitas merged 1 commit into
project-health-hardeningfrom
hardening/39-harden-currency-response-parsing
Jun 14, 2026
Merged

Harden currency response parsing#52
wilsonfreitas merged 1 commit into
project-health-hardeningfrom
hardening/39-harden-currency-response-parsing

Conversation

@wilsonfreitas

Copy link
Copy Markdown
Owner

Summary

  • centralize currency HTML response detection and error extraction for sync and async paths
  • handle unexpected HTML bodies even when Content-Type is missing
  • convert empty CSV bodies and pandas CSV/date/numeric parser failures into clear BCBAPIErrors
  • add sync and async tests for HTML, missing content type, empty CSV, malformed dates, and malformed numeric columns

Fixes #39

Verification

  • uv run pytest -m "not integration" (153 passed, 11 deselected)
  • uv run ruff check bcb/ tests/
  • uv run ruff format --check bcb/ tests/
  • uv run mypy bcb/
  • uv run --group docs sphinx-build -b html docs docs/_build/html

@wilsonfreitas
wilsonfreitas merged commit f46d231 into project-health-hardening Jun 14, 2026
9 checks passed
@wilsonfreitas
wilsonfreitas deleted the hardening/39-harden-currency-response-parsing branch June 14, 2026 20:46
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.

1 participant