Skip to content

fix: handle deeply nested NDJSON responses - #83

Open
shubham841 wants to merge 1 commit into
prooflinedev:mainfrom
shubham841:fix/ndjson-recursion-error
Open

shubham841 wants to merge 1 commit into
prooflinedev:mainfrom
shubham841:fix/ndjson-recursion-error

Conversation

@shubham841

Copy link
Copy Markdown

Summary

Deeply nested JSON in an NDJSON export can raise a raw RecursionError during decoding. The export decoder already maps malformed response payloads to a typed ProoflineError, but this recursion failure was not included in its handled exceptions.

  • Catch RecursionError alongside the existing decode errors.
  • Add a regression test using a 10,000-level nested NDJSON payload.
  • Assert that the decoder raises the expected invalid-response ProoflineError with HTTP status 200.

This addresses the remaining deep-NDJSON decoder case noted in #75.

Tests

  • pytest tests/test_exports.py: 15 passed
  • Full test suite: 220 passed, 8 subtests passed
  • ruff check proofline/exports.py tests/test_exports.py: passed
  • ruff format --check proofline/exports.py tests/test_exports.py: passed
  • mypy proofline/exports.py: passed

This branch has not been deployed

No deployments
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