Skip to content

fix: surface endpoint errors and bump patch version to 1.0.9 - #312

Open
krowvin wants to merge 5 commits into
mainfrom
fix/endpoint-error-handling
Open

fix: surface endpoint errors and bump patch version to 1.0.9#312
krowvin wants to merge 5 commits into
mainfrom
fix/endpoint-error-handling

Conversation

@krowvin

@krowvin krowvin commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Multi-series reads could still log failures and return incomplete data, malformed JSON could be returned as text, and custom user-management errors could hide CDA response details.

Related work:

Changes:

  • Include HTTP status, method, URL, and CDA body in errors, including custom user errors. Route role deletion through the shared API layer and preserve exception causes. Add request outcome and transport failure debug logs without request bodies or authentication headers.
  • Raise BatchError (a RuntimeError subclass) for failed concurrent reads/writes, retaining every original exception in failures. Propagate extent lookup failures and invalid JSON responses; restrict chunk retries to transient failures. Successful writes are not rolled back.
  • Narrow rating validation catches and document error handling and logging.

Audited all 33 endpoint modules and their request paths. Shared coverage includes GET, XML GET, paginated GET, POST, POST with returned data, PATCH, and DELETE.

Local validation: 186 mock/doctest tests pass, strict mypy passes for 38 source files, and Black/isort/whitespace checks pass. New regressions were also run against merged main to confirm the existing gaps. Tests cover eight HTTP error statuses across all request helpers, transport failures, malformed/empty responses, second-page failures, user-role deletion, partial concurrent reads/writes, initialization ordering, and retry behavior. No live database matrix was run for this change.

Compatibility note: callers now receive errors where incomplete results or fallback text were previously returned. Existing RuntimeError handlers continue to catch batch failures. The shared HTTP adapter's retry policy is unchanged.

@krowvin
krowvin requested a review from msweier September 10, 2026 12:35
@sonarqubecloud

Copy link
Copy Markdown

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