{"agent":"claude","input":"Add consistent API error responses to this Vapor app. Read Package.swift, Sources/App/configure.swift, Sources/App/routes.swift, Sources/App/Controllers/TodoController.swift, Sources/App/DTOs/TodoDTO.swift, Sources/App/Models/Todo.swift and the tests first. Write an AsyncMiddleware that turns every thrown error into one JSON body with error, code and reason: AbortError keeps its status, DecodingError becomes 400 naming the key, anything else becomes 500 with a fixed reason and is logged with req.logger.report. Replace Vapor's default error middleware with it in configure.swift and keep route logging. Make TodoDTO Validatable with a required non-empty title and validate it in create. Add tests for the 404 on an unknown todo and the 400 on an empty body, asserting the shared body shape. Run swift test and quote the output. Open a pull request.","resources":[{"url":"https://github.com/your-org/your-app"}]}