pdftract/crates/pdftract-cli
jedarden 21e0b7bd69 fix(pdftract-2f7oi): fix middleware return types for error JSON responses
Fixed compilation error in the custom RequestBodyLimit middleware by adding
Ok() wrappers to match the axum middleware signature. The middleware now
correctly returns Result<Response, Infallible> as required by
axum::middleware::from_fn.

Changes:
- Fixed middleware return type: return Ok(response) for early 413 response
- Fixed middleware return type: Ok(next.run(req).await) for normal flow
- Added verification note documenting complete implementation

All acceptance criteria for pdftract-2f7oi are met:
- 413 JSON response with exact format required by critical test
- 422 responses for encrypted/corrupt PDFs with helpful hints
- 400 responses for missing fields
- All error responses use Content-Type: application/json

Co-Authored-By: Claude Code <claude@anthropic.com>
2026-05-27 20:44:19 -04:00
..
benches feat(pdftract-3h9xo): implement threads JSON output + schema integration 2026-05-25 13:40:15 -04:00
src fix(pdftract-2f7oi): fix middleware return types for error JSON responses 2026-05-27 20:44:19 -04:00
tests feat(pdftract-206o6): implement scientific_paper profile with fixtures and tests 2026-05-27 20:19:10 -04:00
build.rs feat(pdftract-2825c): implement inspector frontend bundle with <80KB size limit 2026-05-27 20:21:08 -04:00
Cargo.toml feat(pdftract-2825c): implement inspector frontend bundle with <80KB size limit 2026-05-27 20:21:08 -04:00
pdftract-cli.cdx.json feat(pdftract-67tm8): implement MCP stdio transport with integration tests 2026-05-23 00:16:42 -04:00