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> |
||
|---|---|---|
| .. | ||
| benches | ||
| src | ||
| tests | ||
| build.rs | ||
| Cargo.toml | ||
| pdftract-cli.cdx.json | ||