Skip to content

feat(etl-uvicorn): carry failure_category through invoke and precheck responses - #76

Closed
CyMule wants to merge 1 commit into
mainfrom
dtpl-694/precheck-failure-category
Closed

feat(etl-uvicorn): carry failure_category through invoke and precheck responses#76
CyMule wants to merge 1 commit into
mainfrom
dtpl-694/precheck-failure-category

Conversation

@CyMule

@CyMule CyMule commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add optional failure_category to InvokeResponse and InvokePrecheckResponse, populated from a failure_category attribute on the raised error (same pattern as the existing status_code pickup), and thread it through the /precheck route
  • lets plugins report the preflight failure_category contract (DTPL-525) through the standard precheck_func= wiring; today the response model silently drops the field, which forced the partitioner to strip and reinstall the SDK's precheck routes (Unstructured-IO/platform-plugins#1780)

Follow-up after release: revert the partitioner to precheck_func= wiring and delete its route-stripping in main.py (DTPL-694).

Testing

  • PYTHONPATH=. uv run pytest test/api/test_api.py — 43 passed, including new coverage for a failing precheck carrying failure_category and a passing precheck leaving it null
  • ruff check clean (the one ruff format complaint in api_generator.py predates this change)

Review in cubic

@CyMule

CyMule commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #77.

@CyMule CyMule closed this Aug 11, 2026
@CyMule
CyMule deleted the dtpl-694/precheck-failure-category branch August 11, 2026 20:57
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