8.14 Error handling and operations¶
How FeeCheck fails and how it is operated, each row linking the section that holds the detail. Two rules run through it: anything the model gets wrong becomes the defined fallback, anything the caller gets wrong is reported (8.7); and no contract content reaches a log (G-6, 8.2).
Failure¶
| Where | What fails | Response | Recorded as | Status |
|---|---|---|---|---|
| Upload | the file is not a PDF, or over the size limit | refused; no case is opened | the HTTP answer (6.2) | built |
| Upload | the PDF is over the page limit | the case is blocked, its PDF kept; a supervisor may release it | the case Blocked with its cause (6.1.1) | built; the release planned |
| Upload | the queue does not take the case | the case fails at once, the PDF is deleted | the case failed, publish-failed (6.2.1) |
built |
| Conversion | docling-serve cannot be reached |
the claim is released and the push answered 503; the queue delivers again |
the case stays queued (6.2.1) | built |
| Conversion | the converter refuses the document | the case fails for good | the case failed, conversion-failed (6.2.1) |
built |
| Queue | a delivery runs out of attempts | the dead-letter push marks the case failed | the case failed, dead-lettered (7.1.2.2) |
built; the cloud resources planned |
| Queue | a queued case is never delivered | reported failed once the queued timeout has passed | the case failed, not-picked-up (6.2.1) |
built |
| Extraction | the model provider answers with a transient fault | retried with one policy for every provider (ModelRetryAdvisor) |
one llm.call line per call, with the failure (G-5, 8.2) |
built |
| Extraction | the model's answer is invalid, unconfirmed or the loop is spent | the defined fallback: an incomplete result that goes to review | the extraction's outcome event (G-5, G-7) | built |
| Stage request | no reply before the reply deadline, or the stage rejects it | the stage task ends; a person may retry it | the case Failed with its cause (6.1.2) | planned |
| Event backbone | a listener fails, or a publication stays incomplete | resubmitted by the scheduled job; stuck ones marked failed | the publication's state in the outbox (8.16.3 rule 7) | built: the resubmission; the cap on the attempts planned |
| Database | the database cannot be reached | readiness goes DOWN, liveness stays UP; the case's requests fail until it is back |
the readiness probe and the uptime check's alert, which names the component to a signed-in person | built |
Operations¶
| Concern | Mechanism | Status |
|---|---|---|
| Health | readiness and liveness probes, used by Cloud Run's startup and liveness probes (5.1.1, 7.1.2); under the database profiles the database is part of readiness and never of liveness, so a database outage keeps a new revision from taking traffic but never makes Cloud Run restart the backend in a loop; the components and their details are shown to a signed-in person only | built |
| Monitoring | an uptime check on the readiness probe, an alert on its failure, and a dashboard of the backend, the database and the dead letters, declared as files in the repository's monitoring folder (7.1.2) | built |
| Logs | structured lines naming a case or an extraction by its internal ID, never by content (G-6) | built for the extraction path |
| Model calls | one telemetry line per call, tool call, re-ask and outcome (G-5, 8.2) | built |
| Module insight | /actuator/modulith and the per-module tracing of the insight starter (8.16) |
built |
| Event backbone | alerts on the backlog of incomplete publications and on the age of the oldest unacknowledged message; dead-letter topics; the outbox purged on a schedule (8.16.3 rule 11) | planned |
| Deployment | the deploy jobs of the build workflow, signed in through Workload Identity Federation (7.1.2) | built |
| Metrics and traces | an OpenTelemetry- and Prometheus-compatible sink that also runs on-premise (ARC-Q4.4, 7.1.3) | planned |
Which sink takes the metrics and traces, and what is measured there:
TBD