Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Better error handling on 4xx/5xx responses #240

@edeandrea

Description

@edeandrea

Do better handling on 4xx/5xx responses.

Example:

2025-12-15 16:45:47,446 INFO  [com.ibm.ingest.DocumentLoader] (Quarkus Main Thread) Processing file: product_overview_cloudx_platform.pdf
2025-12-15 16:45:47,446 INFO  [io.quarkiverse.docling.runtime.client.DoclingClientLogger] (vert.x-eventloop-thread-1) Request:
- method: POST
- url: http://localhost:46613/v1/chunk/hybrid/source
- headers: [Accept: application/json], [Content-Type: application/json], [User-Agent: Quarkus REST Client], [content-length: 343]
- body: {"sources":[{"kind":"http","url":"file:///Users/meisele/Projects/ejq_substack_articles/enterprise-rag-metadata/src/main/resources/documents/product_overview_cloudx_platform.pdf"}],"convert_options":{"to_formats":["md"]},"include_converted_doc":false,"chunking_options":{"chunker":"hybrid","use_markdown_tables":false,"include_raw_text":false}}

2025-12-15 16:45:47,447 INFO  [io.quarkiverse.docling.runtime.client.DoclingClientLogger] (vert.x-eventloop-thread-1) Response:
- status code: 422
- headers: [date: Mon, 15 Dec 2025 14:56:00 GMT], [server: uvicorn], [content-length: 321], [content-type: application/json]
- body: {"detail":[{"type":"url_scheme","loc":["body","sources",0,"http","url"],"msg":"URL scheme should be 'http' or 'https'","input":"file:///Users/meisele/Projects/ejq_substack_articles/enterprise-rag-metadata/src/main/resources/documents/product_overview_cloudx_platform.pdf","ctx":{"expected_schemes":"'http' or 'https'"}}]}

2025-12-15 16:45:47,448 WARN  [com.ibm.ingest.DoclingConverter] (Quarkus Main Thread) Docling conversion failed for file product_overview_cloudx_platform.pdf: Received: 'Unprocessable Entity, status code 422' when invoking REST Client method: 'io.quarkiverse.docling.runtime.client.QuarkusDoclingServeClient#chunkSourceWithHybridChunker'
2025-12-15 16:45:47,448 INFO  [io.quarkiverse.docling.runtime.client.DoclingClientLogger] (vert.x-eventloop-thread-1) Request:
- method: GET
- url: http://localhost:46613/health
- headers: [Accept: application/json], [User-Agent: Quarkus REST Client]
- body: 

2025-12-15 16:45:47,449 INFO  [io.quarkiverse.docling.runtime.client.DoclingClientLogger] (vert.x-eventloop-thread-1) Response:
- status code: 200
- headers: [date: Mon, 15 Dec 2025 14:56:00 GMT], [server: uvicorn], [content-length: 15], [content-type: application/json]
- body: {"status":"ok"}
2025-12-15 16:45:47,449 WARN  [com.ibm.ingest.DoclingConverter] (Quarkus Main Thread) Docling service health check: HEALTHY (file: product_overview_cloudx_platform.pdf)
2025-12-15 16:45:47,449 ERROR [com.ibm.ingest.DocumentLoader] (Quarkus Main Thread) Failed to process file: src/main/resources/documents/product_overview_cloudx_platform.pdf. Error: Failed to convert file: src/main/resources/documents/product_overview_cloudx_platform.pdf

Exception in DoclingConverter.java:120

In this example the response is a 422 which isn't throwing an exception with the correct message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    releasedIssue has been released

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions